Track interactions across multiple domains

With Sitefinity Insight, you can track interactions of visitors across websites hosted on multiple domains. Thus, you better understand the customer journey that may span across different websites and understand how digital resources and the different types of visitors on your sites affect marketing goals.

NOTE: You can also track interactions across domains and their sub-domains. For more details, see Sub-domain tracking.

In this section, you will learn how to implement tracking of visitors' behavior across multiple domains. You understand the relationship between visitors, subjects, and subject mapping and then implement a cross-domain tracking sample code to track your Sitefinity CMS sites.

To track interactions across multiple domains, Sitefinity Insight maps visitors from any tracked domains to a global Sitefinity Insight contact, located on another domain, which is represented by a cookie. For more information, see Manage cookies.

The following sections describe the three main components in cross-domain tracking that you can see in the diagram below. 

Track interactions across multiple domains

Data centers

A data center is a single unit holding the data from one or more data sources, or, in this particular case, domains. For more information, see Manage data centers.

Tracked domains

Each of the set of domains that you track with Sitefinity Insight not only supplies data but also sends JSONP requests to a URL on the mapping domain. Requests are sent when a visitor lands on the tracked domain and the visitor's subject is mapped to a corresponding global Sitefinity Insight contact.

NOTE: The tracked domain only sends a request if it does not detect a dedicated mapping cookie that confirms a previous mapping happened. 

The JSONP request has the following query parameters:

  • The API key value of the data center used by the tracked domain
  • The visitor’s subject value
  • The data source name of the tracked domain
  • The JSONP callback function name

Once the mapping domain returns its response, the callback function on the tracked domain evaluates whether the mapping request was successful or not and sets the appropriate values.

Mapping domain

The mapping domain can be any domain from your set of tracked domains. The difference is that the mapping domain has:

  • The subject of the global Sitefinity Insight contact, which the subjects from the tracking domains are mapped to
  • The logic for sending SubjectMapping data with cross-domain subject values

When a tracked domain sends a mapping request, the browser automatically adds to its Cookie header the cookies that are visible for the mapping domain, including the global subject, if present. When the mapping domain receives the request, it checks the Cookie header for the global subject. If the global subject is available, that is, the contact landed on the site before, the mapping domain sends SubjectMetadata to Sitefinity Insight. If the global subject is missing, the mapping domain creates it on the server, sends SubjectMapping to Sitefinity Insight, and includes it in the Set-Cookie header.

In both cases, the SubjectMetadata data contains the global subject and the subject from the query string of the request, along with the respective data source names. If the mapping process is successful on the Sitefinity Insight side, the mapping domain receives the proper response. As a result, the mapping domain responds to the tracked domain that mapping is successful.

RECOMMENDATION: Starting with Sitefinity CMS 13.3, you control the behavior of the tracking cookie and thus, how visitors are mapped to contacts. We recommend you to keep the setting to the default behavior unless your audience have a very specific behavior which is better mapped by one of the other settings. For more information, see Tracking cookie handling on login.

Was this article helpful?