traffic with utm parameters (ex: facebook ad) are coming as direct/none in source medium reports
Hi,
I have enabled cross-domain tracking for our websites.
Primary Site: sub.domain1.com (gallery of different stores)
People land on the above site from different sources then go to any of our other domains (domain2.com or sub1.domain2.com | sub2.domain2.com etc) or the store’s custom domains (abcd.com) if available.
Then for checkout people go from any of the domains to our own subdomain (checkout.domain2.com)
I have implemented the tracking from GTM, have one-page view event.
Settings of the Page View event in GTM as follows:
allowLinker : true
cookieDomain: autoCross-Domain Tracking:
Auto link domains:
sub.domain1.com, domain1.com, domain2.com, checkout.domain2.com
In the Google Analytics under the referral exclusion, the below sites are listed.
domain1.com
domain2.com
abcd.com (custom domain)
paymentgateway.com
accounts,google.comNow, I click on an ad in facebook with UTM parameters and landed in sub.domain1.com then click on a link to a store page. During this click, _ga cookies are properly getting attached to the store site, now the user clicks on checkout, again the _ga cookies gets passed to the checkout.domain2.com properly.
But the attribution in Audience reports -> source / medium says the checkout.domain2.com entry’s source is direct/none, but that is incorrect as the user came from facebook ad with utm parameters.
Please share your thoughts on how to fix this direct/none attribution issue during cross domain tracking.
Thanks,
Thenn
Details
Reporting
The short answer is:
The persistent ‘direct/none’ source/medium in your Google Analytics 4 reports, despite correct _ga linker parameter passing, indicates a session expiration or premature session start during the cross-domain journey, likely compounded by the client-side nature of your current tracking which can be fragile or get blocked – the ultimate technical solution is to transition to server-side tracking using Google Tag Manager and Stape or Google Cloud Platform, leveraging the Google Analytics Measurement Protocol to control the session data explicitly at the server level, ensuring the initial Facebook Ad UTM parameters are consistently sent with every event, and then using the BigQuery API to push this enriched data into BigQuery for reliable analysis with Looker Studio.
The fundamental problem is that the client-side GA4 implementation, even with allowLinker: true, relies on the browser to manage the session, and when the user navigates across multiple domains (especially with redirects or custom domains), this session context can be lost or reset before the final checkout pageview is recorded, or the original referrer/UTMs are mistakenly discarded in favor of the current domain’s referrer chain.
The long answer is:
Your problem is a classic challenge in complex cross-domain and multi-step funnel tracking, especially when dealing with client-side implementations that are susceptible to browser-level tracking prevention mechanisms or internal session management flaws when moving across several domains, and the most robust, technical fix involves implementing a server-side tracking infrastructure – for your current issue, even though the _ga linker parameter is correctly passing the client ID across sub.domain1.com
to domain2.com
and finally to checkout.domain2.com
, the session-level attribution (which holds the UTM data) is being reset or misattributed, often because the time between domain hops exceeds the session timeout threshold, or because the browser’s document referrer is being used to start a new session before the full attribution context is correctly applied to the final pageview event, leading to the ‘direct/none’ source for the final checkout.
To solve this, you need to use the Google Analytics Measurement Protocol, which is the API that allows you to send event data directly to Google Analytics 4 from your server rather than the user’s browser, giving you full control over the session information – you would set up a server-side GTM container on a platform like Stape or Google Cloud Platform and forward all events (PageView, Click, etc.) to this container from your websites using a custom loader or by modifying your existing client-side GTM setup to send data to your server instead of directly to Google Analytics 4.
The server-side container acts as a proxy: it receives the event, extracts all the necessary data including the vital _ga client ID and the initial UTM parameters (which you must ensure are captured and stored in a first-party cookie or local storage upon the initial landing on sub.
domain1.com), and then uses the Google Analytics Measurement Protocol to craft and send the event payload to Google Analytics 4 – by doing this, you can explicitly include the original utm_source
, utm_medium
, and gclid
(if applicable) with every single event in the user’s journey, even on subsequent domains, overriding any flawed client-side session logic and guaranteeing that the correct Facebook attribution is linked to the final Purchase
or PageView event on checkout.domain2.com
.
This server-side approach using the Google Analytics Measurement Protocol is highly cost-effective in the long run because it dramatically improves data quality and compliance by reducing ad-blocker interference and future-proofing against browser-level tracking restrictions, meaning you spend less on inaccurate ad spend due to bad attribution – for ultimate control and reliability, you should also pipe your Google Analytics 4 data into Google BigQuery using the BigQuery API (or the native GA4 BigQuery export), where you can use SQL to stitch together the user’s complete journey, verify the correct UTM attribution, and create custom reports in Looker Studio using the Looker Studio API for maximum flexibility and to definitively prove that the Facebook Ad was the initial source, bypassing the limitations of the standard Google Analytics 4 interface, thus providing a comprehensive and permanent solution to your cross-domain attribution problem.