Installation and configuration

Synerise works on customers’ online and offline data.
To analyze the activity of your customers, you need to track their actions on the website. You can do this by embedding tracking codes in your pages. You can also use Google Tag Manager.

Creating a tracking code

  1. Go to Settings icon Settings > Tracking Codes > Add tracking code.
    Adding tracking code
    A blank tracking code form
  2. In the Tracking code name field, enter the name. It’s used for identifying the code on the list of tracking codes.
  3. In the Domain name field, enter the URL of the domain (without the protocol).
  4. From the Select features dropdown list, define the scope of features the tracking code will cover.
    You can find more information about possible tracking code variants further in this article.
  5. Copy the code.
  6. Save the configuration by clicking Save.
  7. Paste the copied code into the source of your web pages before the closing </body> tag.
    Important: If you want to use a custom domain to treat Synerise tracking as first-party, see Third-party and first-party tracking.
    To apply the custom domain, in the tracking code, replace the default URL of the JS SDK script (// with the one you received from the Synerise Customer Success & Implementation team.
  8. If you are creating a single page application, modify the tracking code according to this section.

Tracking code in Single Page Applications

If your website is a Single Page Application (SPA), the tracking code must be modified. The modification changes the mechanism of sending page visit events and retrieving dynamic content.

  1. Add the highlighted parameters to the tracking code you created:

        function onSyneriseLoad() {
                'customPageVisit': true,
                'dynamicContent': {
                    'virtualPage': true
    The additional initialization parameters disable page visit events and dynamic content retrieval.

  2. Re-enable page visit tracking and dynamic content retrieval by implementing the following methods in the page:

        .then(function () {

    Page visits and dynamic content retrieval must be implemented according to the following rules:

    • og:tags must be loaded first, regardless of the method that is used to load them
    • page visits and dynamic content must be requested whenever the page is loaded, reloaded, and when the view changes

    Tip: You can use Google Tag Manager to implement the methods. To do so, trigger SR.event.pageVisit(); and SR.dynamicContent.get(); methods on events that indicate a page or DOM being loaded. SR.init is only called when DOM is loaded.

Tracking script variants (no custom domain)

We have several variants of our Javascript SDK that you can use depending on the required features.

Fewer features usually result in smaller page size and shorter load times.

Script version URI
Script with all functionalities
Script without Cookie Matching
Script without WebPush
Script without WebPush and Cookie Matching
Script without Cookie Matching, Automation-based Dynamic Content, and WebSockets

Additional tracking configuration parameters

The only required parameter during the initialization of the tracking code is the trackerKey parameter.
By using the additional parameters described below, you can modify the configuration of the tracking code.

Google dataLayer

If you are using Google dataLayer, you can connect it with Synerise.
By using Enhanced Ecommerce you can track transaction events.



If you are using several sub-domains, you can limit tracking to only generate data for particular domains. To do that, add the domain name in the script:


Automatic tracking of page visits

You can turn off the automatic collection of page visit events with the customPageVisit parameter.
In this case, events should be sent manually using the sdk methods.


Synerise webpush worker scope

If you use Synerise webpush and need to set a custom service worker scope (registration path), you can enter that path as a parameter.


Disabling modules

Additionally, if you need to disable some Synerise modules on a specific sub-page or domain, you can do it by specifying the parameters as below:


By default, the _snrs_p, _snrs_uuid, and _snrs_puuid cookies expire after 30 years. You can change this by using the cookieExpiration parameter. The value is the number of days after which the cookies expire.

Note: The expiration time of the _snrs_sa and _snrs_sb cookies is 30 minutes and cannot be changed.

The following example sets cookie expiration time to 60 days:

    'trackerKey': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
    'cookieExpiration': 60


Requests to the SDK may require customer authentication. For more details, see this article.


We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.



Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker