Third-party and first-party tracking

Some browsers use mechanisms that disable third-party tracking scripts and cookies. This disables Synerise tracking.

To avoid this, you must serve the Synerise tracking tools from your own subdomain. The Synerise Customer Success & Implementation (CSI) team delivers a modified tracking script that uses the new domain.

Note: Insert the tracking code directly into the code of your website.
Don’t use Google Tag Manager for this, because GTM can be treated as third-party and blocked.

After you receive the modified script and update the DNS and certificates, you must also update the URLs of some requests made from your website.

When you complete the instructions in this article, the tracking domain will change from a Synerise domain to your sub-domain. Third-party tracking blockers will not affect Synerise tracking.

Configuring Synerise as first-party tracking in SDK script

  1. In your hosting, create a subdomain for Synerise tracking, for example api.example.com
    The domain name should not: contain indications that it is used for tracking; refer to Synerise; or include strings typical to Synerise elements, such as snr or snrs.
  2. Configure a CNAME DNS entry for the created subdomain:
    // For Azure Cloud deployments:
    NAME                    TYPE   VALUE
    --------------------------------------------------
    api.example.com.        CNAME  web.snrbox.com.
    
    // For Google Cloud Platform deployments (currently only available in Belgium):
    NAME                    TYPE   VALUE
    --------------------------------------------------
    api.example.com.        CNAME  web.geb.snrbox.com.
    Note: After creating a DNS entry, you may need to wait 24-72 hours before it becomes active.
  3. Contact Synerise Support and provide the subdomain name.
    Synerise Support delivers a JS SDK script that uses the new subdomain.
  4. If you want to use your own certificate:
    1. Prepare an X.509-format certificate.
    2. Deliver the public key as a .pem file to Synerise Support.
      Important: When you use your own certificate, it is your responsibility to monitor its expiration time and re-generate it.
  5. If you want Synerise Support to provide a certificate for you:
    1. Contact Synerise Support to request the certificate.
      Synerise Support generates a certificate by using third-party solutions such as letsencrypt.org.
    2. If your domain has CAA records, add the following record to the root domain or subdomains used with Synerise:
      api.example.com. IN CAA 0 issue “letsencrypt.org”
      
      Important: If your domain does not use CAA records, you do not have to add them.
  6. Begin using the modified JS SDK script.
    Note: Insert the tracking code directly into the code of your website.
    Don’t use Google Tag Manager for this, because GTM can be treated as third-party and blocked.
    See Getting started.

Updating your API requests

In API requests authorized with the tracker key (for example, Recommendations, Search, AI events APIs), change the domain to your custom domain.
These endpoints can be recognized by the availability of authorization methods other than JWT:

  • the X-Api-Key header.
  • the token parameter in the query, for example:
    api.synerise.com/search/v2/indices/123/query?query=q&token=B264B70A-1111-1111-1111-AC35EEFA0B59
                                                         |------ tracker key authentication ------|
    
Note: JWT authorization is available for these endpoints, but should only be used by backend applications.

Example:
If you make requests to the following endpoint:

https://api.synerise.com/search/v2/indices/123/query?query=q&token=B264B70A-1111-1111-1111-AC35EEFA0B59

the new query is:

https://api.example.com/search/v2/indices/123/query?query=q&token=B264B70A-1111-1111-1111-AC35EEFA0B59
😕

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.

😉

Awesome!

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