How to set up Google Analytics to track user engagement from your site through completion of the Roobrik survey
Cross-domain tracking is a Google Analytics configuration that allows you to send a user’s anonymized client ID from your website to the Roobrik survey and preserve the session information. That way, the user is being tracked as the same person across the two websites. The _ga cookie (that Google Analytics uses to identify visitors) has the same value on your website AND tools.roobrik.com.
How does Roobrik enable this?
Because you need to have access to both websites you want to track, Roobrik will request your Google Tag Manager (GTM) container code. We place it on the landing page and dashboard of the survey. Once complete you need to follow the steps below to enable cross-domain tracking.
How do I enable this?
There are four steps for setting up cross-domain tracking:
1. Verify Measurement ID Setup
Cross-domain tracking requires your website and Roobrik be tracked in the same Google Analytics property. The options are below. Choose the one that best fits your capabilities and reporting needs.
-
- use your current GA4 Measurement ID (G-XXXXXXXXXX)
- create a new measurement ID that combines activity from both websites
If you're using your current property, make sure to update any filters or reports to account for traffic from both domains, especially if you're filtering by hostname.
2. Create a GA4 Configuration Tag in GTM
In Google Tag Manager, you’ll want to use a GA4 Configuration tag—this is different from the older Universal Analytics settings.
To do this:
-
Create a new GA4 Configuration tag in GTM
-
Enter your Measurement ID
-
Set it to fire on all pages
-
(Optional) If you're manually sending page view events elsewhere, uncheck the default "Send a page view" box
This tag is the core that GA4 needs to work across your sites.
3. Configure Cross-Domain via GA4 UI
Next, log into your GA4 property and tell it which domains are related.
-
Go to Admin → Data Streams → Web stream
-
Click "Configure tag settings", then "Configure your domains"
-
Using a "contains" rule, add both your main site (e.g.,
yourdomain.com
) and Roobrik (tools.roobrik.com
)
This ensures GA4 knows to treat these domains as part of the same user experience.
4. (Optional) Add Auto Link Domains in GTM
In most cases, GA4 handles cross-domain linking on its own once you've added your domains in the UI.
But if you want more control or need to make sure specific links carry tracking parameters, you can manually add a field in your GA4 tag:
-
Edit your GA4 Configuration tag
-
Under Fields to Set, add:
-
Field Name:
linker.autoLink
-
Value:
yourdomain.com,tools.roobrik.com
-
This tells GA4 to explicitly include tracking parameters when users move between domains.
How can I test my setup?
Once everything is set up, you can run a simple test:
-
Visit your main site
-
From your main site, click a link to a Roobrik survey
-
On the Roobrik survey page, check the URL — you should see a parameter like
?_gl=...
-
In GA4, use DebugView or Real-Time reports to verify that the session is maintained across both domains
If all looks good, the users are now being tracked seamlessly.
Why You Don’t Need Referral Exclusions Anymore
Unlike Universal Analytics, GA4 doesn’t use a “Referral Exclusion List.” As long as your domains are linked correctly in the GA4 UI, traffic between them won’t be counted as a new session. The _gl
parameter takes care of this automatically.
Summary Checklist
-
The same GA4 Measurement ID is installed via GTM on both domains
-
A GA4 Configuration tag is firing on all pages
-
Both domains are listed in GA4 under Configure tag settings → Configure your domains
-
(Optional) The
linker.autoLink
field is set for manual control -
You see the
_gl
parameter in cross-domain URLs -
GA4 DebugView or real-time reports show consistent session/user activity across domains
Additional Resources
Google Support
https://support.google.com/analytics/answer/10071811?hl=en
Google Developers
https://developers.google.com/tag-platform/devguides/cross-domain