Cross-domain tracking setup in Usermaven
Cross-domain tracking allows you to track a single user’s journey across multiple related websites or domains as if they were all part of one unified site. Without it, understanding how users interact with your different online properties can be difficult.
If your business operates across several distinct domains (e.g., yourbusiness.com
and yourproduct.org
), users moving between them would normally appear as separate individuals in your analytics. This fragments your data and can lead to an inaccurate understanding of the complete user journey and engagement.
For instance, if a customer browses your main company site on one domain and then makes a purchase on a separate e-commerce domain, these actions would look disconnected. Cross-domain tracking solves this by recognizing that user John Doe visiting www.example.com
and later www.example-store.net
is the same person.
Important note on sub-domains: If your setup only involves tracking across sub-domains of the same top-level domain (e.g.,
www.yourmaindomain.com
,blog.yourmaindomain.com
, andapp.yourmaindomain.com
), Usermaven typically handles this automatically once the tracking pixel is installed on those sub-domains. The specific cross-domain setup described below is primarily for tracking between entirely different top-level domains (e.g.,domain-a.com
anddomain-b.org
).
Important note on cookieless tracking: You don’t need to perform Step 2 if you’re using cookieless tracking. Usermaven automatically connects the journey of a user across different top-level domains and sub-domains
Technical implementation
To enable cross-domain tracking for different top-level domains, you’ll first configure these domains in your Usermaven workspace and then update the Usermaven tracking pixel on all involved websites.
Step 1: Configure additional domains in Usermaven (for different top-level domains)
This step is crucial when you need to link user sessions across entirely separate top-level domains.
- When to do this: If you’re linking distinct domains like
myfirstdomain.com
andmyseconddomain.org
. (You don’t need this for sub-domains likeblog.myfirstdomain.com
ifmyfirstdomain.com
is your main workspace domain). - Action: In your Usermaven dashboard, go to
Workspace Settings > General > Additional domains
. - Instruction: Add each separate top-level domain you intend to link. For example, if your primary workspace is
example.com
and you want to track users moving toanotherexample.org
, addanotherexample.org
here. - Why: This tells Usermaven to associate data from these separate domains with your primary workspace and link user sessions correctly.
Step 2: Update your Usermaven tracking pixel
Modify the tracking script on all websites participating in the cross-domain setup. You should already have the Usermaven tracking script installed in the <head>
section of your HTML. Add two attributes to this script:
// Required attributes for cross-domain tracking
t.setAttribute('data-cross-domain-linking','true');
t.setAttribute('data-domains','domain-a.com,domain-b.org'); // List only top-level domains
data-cross-domain-linking='true'
: Enables the cross-domain linking feature.data-domains='domain-a.com,domain-b.org'
: Crucial: Replace the example domains with a comma-separated list of all domains that are part of your cross-domain tracking setup. This list must be identical on all pages where the script is installed for cross-domain linking to work.
How it works:
When a user clicks a link from one of your configured domains (e.g., domain-a.com
) to another (e.g., domain-b.org
), Usermaven automatically appends a special query parameter (_um=...
) to the destination URL.
For example: https://domain-b.org/?_um=*abc*
.
The Usermaven script on domain-b.org
recognizes this parameter, allowing it to link the user’s session from domain-a.com
, thereby treating it as a single, continuous journey.
Important consideration: Cross-domain tracking in Usermaven relies on cookie-based tracking and this step is not required for cookieless configurations.
Benefits of cross-domain tracking
Implementing cross-domain tracking correctly provides significant advantages:
- Unified user view: See the complete user journey across all your linked digital properties.
- Accurate attribution: Correctly attribute conversions and revenue to the right touchpoints, even if they span multiple domains.
- Enhanced analytics: Analyze comprehensive user funnels, engagement metrics, and paths across your entire ecosystem.
- Data-driven decisions: Make more informed business decisions based on a complete and reliable understanding of your multi-domain user base.
By setting up cross-domain tracking in Usermaven, you eliminate data silos and gain a clear, unified view of how users interact with all your online platforms.