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.
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
- 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 assnr
orsnrs
. - 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. - Contact Synerise Support and provide the subdomain name.
Synerise Support delivers a JS SDK script that uses the new subdomain. - If you want to use your own certificate:
- Prepare an X.509-format certificate.
- 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.
- If you want Synerise Support to provide a certificate for you:
- Contact Synerise Support to request the certificate.
Synerise Support generates a certificate by using third-party solutions such as letsencrypt.org. - 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.
- Contact Synerise Support to request the certificate.
- Begin using the modified JS SDK script. 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 ------|
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