Skip to main content
All CollectionsPixel Installation
How to Set Up Source Pixel for Cross-Domain User Tracking
How to Set Up Source Pixel for Cross-Domain User Tracking
Updated over 5 months ago

Overview

The Source Pixel enables tracking of users across multiple domains by sharing a cookie containing a unique identifier for each user. To ensure seamless tracking across different domains and subdomains, it is crucial to correctly configure your website domain during the onboarding process and implement the Source Pixel script on all relevant domains and subdomains.


Domain Configuration

For effective tracking across domains and subdomains, follow these guidelines:

Primary Domain Selection

When configuring your website domain, always select the highest-level domain you control. For instance, if your domains include source.app, auth.source.app, and t.auth.source.app, you should specify source.app as your website domain. This ensures that the cookie containing the user ID is accessible across all subdomains (e.g., auth.source.app and t.auth.source.app).

Subdomain Limitations

If you configure the website domain at a subdomain level (e.g., auth.source.app), the cookie will only be available for that specific subdomain and its subdomains (e.g., t.auth.source.app). This restricts tracking capabilities across other domains like source.app.

Recommendation: Always specify the highest-level domain to maximize tracking capabilities across all associated domains and subdomains.


Implementing the Source Pixel Script

To ensure accurate user tracking, the Source Pixel script must be added to every domain and subdomain you wish to monitor. Follow these steps:

  1. Insert the Source Pixel script into the <head> tag of each page on your domains and subdomains.

  2. Configure Query Selectors to capture necessary data, such as the user's email input field. Make sure each query selector is properly specified with the correct URL for the input field.

Learn how to find your field Id for your form here


Example Configuration

If your website operates on the following domains:

  • source.app

  • auth.source.app

  • t.auth.source.app

Set source.app as the primary domain during onboarding. This configuration allows the user ID cookie to be accessible across all these domains, enabling consistent user tracking regardless of where the user interacts with your site.

Did this answer your question?