Custom Tracking Domain (CTD)

This feature is currently in Beta version.

What is the purpose of custom tracking domain

Custom tracking domain (CTD) is a way to maintain reliable tracking, data quality and a single customer view compatible with the tracking protection mechanisms introduced by browsers, such as Safari's Intelligent Tracking Prevention (ITP) or Mozilla's Enhanced Tracking Protection (ETP) or many ad blockers. Measures taken by the browsers primarily aim to protect the user's privacy and as a result, change the way cookies are handled. Since browsers are becoming more privacy-conscious, Exponea and its use of "cookie" has to adapt as well. The custom tracking domain enables the switch from JavaScript cookies to HTTP cookies.

📘

CTD restores the original state of your standard tracking, but not cross-domain tracking.

How does it work

To make your cookie resistant against ITP and similar measures you can use your subdomain as a custom tracking domain (CTD) for front-end tracking. This gives you the ability to set server-side cookies by Exponea API under your first-party custom tracking domain such as analytics-api.yourdomain.com ( \*.yourdomain.com ), making the Exponea cookie a first-party server-side cookie resistant to tracking preventions.

Most commonly, Exponea uses the api.exponea.com domain to serve JS SDK, service worker for web push notifications, and all of our API endpoints (this may differ for private instances) However, you can configure a custom tracking domain for each top-level domain of each website that you are tracking.

Default example:
Website: www.myeshop.com

  • Tracking API set to api.exponea.com
  • JS SDK loaded from https://api.exponea.com/js/exponea.min.js
  • JS SDK creates document cookie on domain .myeshop.com

Custom tracking domain example:
Website www.myeshop.com and custom tracking domain analytics-api.myeshop.com

  • Tracking API set to analytics-api.myeshop.com
  • JS SDK loaded from https://analytics-api.myeshop.com/js/exponea.min.js
  • JS SDK creates document cookie on domain .myeshop.com
    Name: __etc_exponea__
    Domain: .myeshop.com
    Set by: JS API document.cookie
    Type: client-side, first-party
  • Tracking API creates server-side cookie on domain .myeshop.com
    Name: xnpe_<project_id>
    Domain: .myeshop.com
    Set by: Tracking API
    Type: server-side, first-party
  • Both __etc_exponea__ and xnpe_<project_id> will hold the same value

How to set up a custom tracking domain

Shared instance
Private instance

If you are not sure which guide to follow go to Project settings -> General -> General project settings as seen in the picture below and check whether you see the Custom tracking domain setting, if yes follow the Shared instance guide, if not follow the Private instance guide.

Cross-domain tracking

Tracking prevention measures are primarily aimed to disable covert data tracking and collection of user data across domains. Therefore, these measures also directly influence our feature shared cookies that enabled cross-domain tracking of anonymous users for clients that operate multiple websites. By using CTD the shared cookies functionality is effectively eliminated as those solutions are not compatible. However, this means only cross-domain tracking for anonymous users via cookies is not possible, but you are still able to track customers across your domains via identification e.g motivate your customers to log in.

Updated 3 months ago


Custom Tracking Domain (CTD)


This feature is currently in Beta version.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.


We rely on cookies

to optimize our communication and to enhance your customer experience. By clicking on the Accept and Close button, you agree to the collection of cookies. You can also adjust your preferences by clicking on Manage Preferences. For more information please see our Privacy policy.

Manage cookies
Accept & close

Cookies preferences

Accept & close
Back