Google Analytics has been deemed illegal by the EU DPA. Undicat is a British company, operated fully on European infrastructure.

Advanced script methods

These are the advances methods we offer with our script. For most customers, the regular installation is more than enough.

Common Client methods

Track pageview

The typical use case for using this would be for someone handling routing manually themselves. Perhaps they have their own SPA / AJAX page loading or want more control over the data they send to Fathom.


In addition to this, you can also go more complex and set your own parameters (when using this method, the canonical will not be used, as this becomes the source of truth):


Track an event

You can track an any event and it will automatically appear in the Undicat dashboard.

// Event Code (string), The code you are given when you set-up the event
// Meta (JSON)
undicat.send('eventCode', meta);

Change tracking status

You can turn tracking on/off dynamically, in case it is needed:

Start tracking

If you loaded the script with automatic tracking disabled (disable-auto="true") you can start tracking using the start method:


Stop tracking

To stop tracking for any reason, you can use the stop method:


Note: use the stop call carefully, we won't save any data until the start method is called. (For privacy reasons we do not save stop events, so we won't show any relevan information in the Dashboard)

Customisation methods

Set language globally

You can manually overwrite the language header sent by our script in case your site offers multi-langual content.

// Language (string), Any ISO6391 langauge. eg.: 'en-GB' or simply 'en'

Working with custom user identifiers

User fingerprints can be manually overwritten to put a face behind the numbers or to track uer engagement spcifically.

// User (string), any identifier for the user

To remove, "log out" the user, you have two options, either log out the user, or set the identifier to a nullable



// Use null to remove the current auth header

For more advanced usage you may want to use the setUser method:

// User (string), any identifier for the user
// Authentication state (boolean), whether the user is currently authenticated
undicat.setUser('user', false)


For more advanced, e-commerce related tracking please visit our e-commerce guide