Cross Domain Tracking

Cross domain tracking allows you to identify users and track their behavior across multiple domains. This enables you to run experiments that span different websites and accurately attribute conversions even when users navigate between domains.

Pro Feature: Cross domain tracking requires a Pro plan. It's perfect for setups where users start on one domain and convert on another, or when you need to track user behavior across multiple related websites.

How Cross Domain Tracking Works

When you add an additional allowed domain to your project, Stellar is able to identify the same user across both your original domain and the additional domain. This means:

  • User sessions are maintained across domain boundaries, ensuring accurate visitor identification
  • Events triggered on any tracked domain are tied to the same user profile
  • Conversions can be properly attributed to experiments, even if the conversion happens on a different domain
  • You get a complete view of the user journey across all your domains

Setting Up Cross Domain Tracking

Setting up cross domain tracking is straightforward. Follow these steps to get started:

1. Add Additional Allowed Domains

  1. Navigate to your Account page in Stellar
  2. Find your project and click View Settings
  3. Scroll to the Additional Allowed Domains section
  4. Enter the domain you want to track (e.g., checkout.example.com)
  5. Click Add to include it in your allowed domains list

Tip: You can add multiple domains to track user behavior across your entire ecosystem of websites.

2. Install the Stellar Snippet

Once a domain is added to your allowed domains list, you need to install the same Stellar snippet on the additional domain. This is the exact same snippet you use on your original domain.

Important: Use the identical snippet code on all domains. The same API key must be used across all tracked domains for cross-domain identification to work properly.

3. Anti-Flicker Considerations

When installing the snippet on additional domains, the anti-flicker version becomes less critical. Here's why:

  • The primary purpose of tracking on additional domains is to capture events and conversions, not to run visual experiments
  • Most cross-domain setups involve experiments running on the original domain and converting on the additional domain
  • Using the standard snippet on additional domains reduces complexity and potential performance impact

Note: If you do plan to run visual experiments on the additional domain, you can still use the anti-flicker snippet. However, for most tracking-only scenarios, the standard snippet is sufficient.

Common Use Cases

Cross domain tracking is particularly useful in the following scenarios:

Marketing Site to Checkout Flow

You run A/B tests on your marketing site (www.example.com) and users complete purchases on a separate checkout domain (checkout.example.com). With cross-domain tracking, you can accurately measure which variant led to the conversion.

Multi-Brand Websites

If you operate multiple related websites (e.g., brand1.com and brand2.com), you can track users moving between them and understand the complete customer journey.

Subdomain Architecture

For businesses with separate subdomains for different purposes (e.g., blog.example.com, shop.example.com, support.example.com), cross-domain tracking ensures a unified view of user behavior.

Example Setup

Let's walk through a practical example of setting up cross-domain tracking:

Scenario: You have a marketing website at marketing.example.com where you run headline tests, and a separate checkout site at checkout.example.com where users complete purchases.

  1. Your original project in Stellar is set up for marketing.example.com
  2. Add checkout.example.com to your Additional Allowed Domains
  3. Install the Stellar snippet on marketing.example.com (with anti-flicker if running visual experiments)
  4. Install the same Stellar snippet on checkout.example.com (standard snippet is fine)
  5. Create an experiment on marketing.example.com testing different headlines
  6. Set up a conversion goal that tracks purchases on checkout.example.com
  7. When users navigate from your marketing site to checkout, they're tracked as the same user
  8. Conversions on checkout.example.com are correctly attributed to the experiment variant they saw on marketing.example.com

Success! You can now see which headline variant drives the most purchases, even though the purchase happens on a completely different domain.

Troubleshooting

Users Not Being Tracked Across Domains

If users aren't being tracked across domains, check the following:

  • Verify that the same API key is used in the snippet on all domains
  • Confirm that all additional domains are listed in your Additional Allowed Domains settings
  • Ensure the Stellar snippet is properly installed and loading on all domains
  • Check your browser's console for any CORS or security errors that might prevent cross-domain tracking

Conversions Not Being Attributed

If conversions are firing but not being attributed to experiments:

  • Verify that your conversion goal URL pattern matches the pages on your additional domain
  • Ensure users are actually navigating from one domain to the other (not opening links in new tabs, which creates separate sessions)
  • Check that there's no significant delay between domains that might cause session timeout

Best Practices

  • Use descriptive domain names: When adding domains, use clear, descriptive naming to help you track which domains are which
  • Test the full user journey: Before launching experiments, test the complete flow across domains to ensure tracking works correctly
  • Monitor your implementation: Regularly check that the snippet is properly installed on all domains
  • Document your setup: Keep notes on which domains are tracked and their purposes for easier maintenance

Related Documentation