Cross domain tracking and conversion
Hi to everyone,
I have a landing page with a button that takes the user to a store page which opens in a new tab. This store page is a different domain name than the landing page.
I have cross-domain tracking setup:Step 1: Landing page (domain1.com, the landing page)
Step 2: Store page (domain2.com, it’s a sell store)
Destination goal:Thank_you
page (domain2.com/thank_you
)People land on domain1.com from Adwords ads. Here, they find a button with UTM parameters settinmg like this (
utm_campaign
=Adword&utm_medium
=button&utm_source
=Landing) that goes to domain2.com for the checkout. I have implemented the global variable tracking from GTM:allowLinker : true
cookieDomain: autoCross-Domain Tracking –> Auto link domains:
domain1.com, domain2.com
In the Google Analytics under the referral exclusion, the below sites are listed:domain1.com
domain2.comI think all is setting correctly, but I don’t understand Why my conversion are not be tracking in Adwords after a purchase in domain2.com.
Details
Reporting
The short answer is:
Your cross-domain setup in Google Analytics 4, utilizing allowLinker: true
and autoLinkDomains
for domain1.com
, domain2.com
, is generally correct for maintaining a single session across both domains via the linker parameter, but the missing piece is reliably connecting the final purchase conversion event from domain2.com back to your Google Ads campaign for accurate attribution.
The most robust and cost-effective solution is to implement server-side tracking using Google Tag Manager (GTM) with Stape running on Google Cloud Platform (GCP), specifically leveraging the Google Analytics Measurement Protocol to send the Purchase
event directly from your server to Google Analytics 4, bypassing client-side issues.
Additionally, to ensure Google Ads receives the conversion, you should configure a Google Ads Conversion Tag in your server-side GTM container, using the same Google Analytics Measurement Protocol data to fire the conversion, attributing it back using the gclid
which must be captured on domain1.com
and securely passed to domain2.com
and into the server-side payload.
The long answer is:
Your problem stems from the reliance on a purely client-side setup for the final conversion tracking, which is susceptible to browser limitations like Intelligent Tracking Prevention (ITP) and ad-blockers, preventing the Google Ads conversion tag on domain2.com/
from firing or reading the necessary campaign data (specifically the thank_you
gclid
– Google Click ID) from the client-side cookies set on domain1.com.
To solve this and ensure the purchase is tracked and correctly attributed in Google Ads, you must shift your conversion tracking to a server-side architecture.
This involves using Google Tag Manager (GTM) in a server-side container hosted on a cloud environment like Google Cloud Platform (GCP) or a managed service like Stape.
The architecture should be as follows: first, when a user lands on domain1.com
from a Google Ad, the gclid
must be captured from the URL and stored securely, often in a first-party cookie or local storage, which your server-side setup can access.
When the user completes the purchase on domain2.com/
, instead of relying on a client-side tag to fire, your eCommerce system (the selling store) should trigger a webhook or make an API call to your server-side GTM container, sending the complete purchase details along with the stored thank_you
gclid
.
Your server-side GTM container will then use this incoming data to initiate the actual conversion tracking.
Crucially, the Google Analytics Measurement Protocol should be used to send the Purchase
event to Google Analytics 4, as this is a robust API designed for server-to-server data transmission, circumventing client-side blocks.
Simultaneously, the server-side GTM container will fire a Google Ads Conversion Tag which will use the same gclid
and purchase data to report the conversion directly to Google Ads, guaranteeing accurate and resilient attribution.
This server-side approach is highly cost-effective in the long run because it dramatically improves data quality and conversion reporting reliability, leading to better optimization of your Google Ads spend, saving money that would otherwise be wasted on poorly attributed campaigns, and reducing dependency on the volatile client-side environment.
Furthermore, to provide rich, deeper data analysis, once the data is flowing reliably into Google Analytics 4, you should also consider integrating with BigQuery using the BigQuery API to export raw event data for custom attribution models and complex reporting, and then visualizing that data in Looker Studio via its API connector, offering a complete, end-to-end data pipeline solution.