Welcome to Edition No. 104 of my weekly newsletter, teaching you how to use GA4 to supercharge your content strategy.
I got laid off May 1.
I have been spending the weeks since recharging, job searching and doing a little work for old clients.
If you’re interested in teaming up – or know of an intriguing content/growth strategy role – I would love to hear from you.
So that’s why I haven’t written any newsletters recently.
Paid subscribers: I added 60 days to your most recent purchase at no charge.
Now, onto the good stuff.
Today’s edition is geared toward those of you who manage multiple, related websites.
For example, if you have one website for content and another for purchases.
Or if you have multiple brands under the same organizational “roof.”
I’m going to show you how to unify data across those different websites into a single Google Analytics 4 property.
To make things easier to understand, I’ll be using my two websites as an example:
gerickdigitalstrategy.com: For content and services
bradgerick.com: For bio and portfolio
Two different URLs for a single “organization.”
You might have a similar situation where you create content on one site and allow people to purchase subscriptions or products on another.
Let’s talk about how to set this up, the benefits of doing so, and how to distinguish between each website’s user activity within the same GA4 property.
What is Cross-Domain Tracking?
Cross-domain tracking allows you to follow a single user's journey between multiple websites, treating their activity as one continuous session rather than separate, disconnected visits.
Without this tracking in place, each of your websites operates like an island with no knowledge of what happens on the other. This creates blind spots in understanding your audience’s behavior.
For example, you might see that your blog gets lots of traffic and your store makes sales, but you'd have no way to know if the blog readers are the same people making purchases, or how long it typically takes someone to move from reading your content to buying your products.
Here’s how Google’s documentation puts it:
When there is consent, Analytics uses first-party cookies to set IDs for each unique user and each unique session.
Without cross-domain measurement, new cookies with new IDs are created for each domain a user visits. As a result, a single user visiting different root domains (e.g. www.example.com and www.anotherexample.com) on the same device will be identified separately (two users and two sessions instead of one user and one session).
With cross-domain measurement, the cookies retain the same IDs as they are passed from one domain to another via a URL parameter (
_gl
) when the user navigates between domains through a link or a form. As a result, Analytics identifies just one user and one session.
It’s NOT Subdomain Tracking
Cross-domain and subdomain tracking are not the same thing.
To clarity, subdomain tracking would be if you had the websites sportzz.com and orioles.sportzz.com. The latter is a subdomain of the former.
Because they both have the base domain of sportzz.com, GA4 will automatically track data for each within the same data stream.
In other words, you don’t need to “set up” subdomain tracking. It’s already done for you.*
*So long as you have the same Google Analytics tag – via code, a CMS plug-in or Google Tag Manager – on the subdomain as well as the base domain.
Benefits of Cross-Domain Tracking
At a high-level, cross-domain tracking helps track user activity across multiple websites, as mentioned above.
Here’s a more detailed look at the benefits:
Custom Journey Visibility: See the full picture of user activities across all your sites instead of having to stitch them together
More Accurate Attribution: Instead of only recognizing last-touch attribution, you’ll know which assets on each of your sites contributed to a lead, and hopefully, conversion
Reduced Data Duplication/Inflation: You won’t count the same user as three users across three sites. Instead, they’ll be one user with three sessions on each site.
Better Decision-Making Power: With more accurate data comes more confident strategic decisions. Not just about how to market to your target customers, but also about how to design your websites.
Cross-Domain Clicks Aren’t Outbound: If a user is on gerickdigitalstrategy.com and clicks an outbound link to another website, say, dogzz.com, that would be tracked in GA4 an outbound click (triggering the “click” event). But if they navigate from gerickdigitalstrategy.com to a link on bradgerick.com, the “click” event would not be triggered because it would not be considered an outbound click, even though they’re two different websites.
Problems with Not Setting Up Cross-Domain Tracking
There are two primary problems with not setting up cross-domain tracking.
1) Google will count traffic from one website to another within your organization as a referral. (This is the inverse of the last benefit listed directly above.)
The referral source for the “receiving” website will be skewed. What should be counted as an additional internal page view will instead be accounted as an entirely new session.
Google calls this problem “self-referrals.”
2) Your user count will be inflated. Since Google has no way of knowing that it’s the same user on two (or more) of your websites – unless you set up cross-domain tracking – it will count them as separate.
To keep things simple, let’s say you have 1 million people per month visit your first website and 1 million per month visit your second website.
Imagine that 900,000 from each site also visit the other site.
If you have these website’s data on separate properties, it’s going to look like each of them received 1.9 million users per month, for a grand total of 3.8 million.
That means you would be over-counting your total users by 1.8 million!
Set Up Cross-Domain Tracking
1) Add the same Google Tag – again, in your code, using a CMS plug-in or in Google Tag Manager – to all the websites that you want to track within the same property.
Google recommends using the same data stream for cross-domain tracking. Now here’s an important aside:
It is possible to set up cross-domain tracking within the same property using different data streams. But just know, this isn’t what Google recommends.
For that reason, I’m going to walk you through the recommended steps.
Let’s start by navigating to your data stream under Admin > Property settings > Data collection > Data streams.
If you are using separate Google Tag Manager containers for each site (a whole other topic we won’t broach today) you will want to use the same measurement ID for each Google Tag. There is a place to add this to your code, your GTM tag or your CMS plug-in, depending on how you set up GA4.
2) Once you’re sure you’re using the same measurement ID for all sites, and that you have your data stream page up, click on the main data stream for which you want to set up cross-domain tracking. (It’s normal if you only have one data stream.)
Within your data stream, click “Configure tag settings.”
3) Then click “Configure your domains.”
4) Now comes the important part: adding your domains.
Click “add condition” so there’s a row for each of your domains.
In the Match type column, you’ll see a few options. If you choose exactly matches, as I have, you will not capture subdomains.
e.g., If I had a subdomain of blog.bradgerick.com, that would get counted in my overall GA4 data, but it would not be included in cross-domain tracking. So any clicks from blog.bradgerick.com to gerickdigitalstrategy.com and vice versa would be seen as outbound link clicks, which is not what we want.
If you do have subdomains, or just want to be safe, you can chose “Contains” instead of “Exactly matches.”
Just be careful if you have a URL that could be the tail end of another URL.
e.g., If your website is cars.com and you chose “Contains,” every URL that ends with cars.com – scars.com, coolcars.com, ofcars.com – would all be seen by Google as internal referrals, which is not what we want, either.
On the other hand, if someone uses Google Translate on your browser, the URL will change slightly, and you’ll miss out on that traffic. (You can see an example of this further down in this post.)
Whatever you pick, put your URL in Domain. (You can optionally add www. – i.e., www.bradgerick.com – which would help with the “Contains” issue I just mentioned.)
Once you have added all your URLs, click the blue Save button.
That’s it – you’re all set!
After 24–48 hours pass, check your traffic referrals report for a date range that’s after the date you set up cross-domain tracking. You should not see any of your websites listed within the Session source / medium dimension of traffic referrals.
Now that cross-domain tracking is set up and you essentially have all your data from both websites mixed together, how do you separate activity between the two (or more)?
That’s a great question.
Analyzing User Activity for a Single Website
Now that I have all user activity for gerickdigitalstrategy.com and bradgerick.com within the same data stream and with cross-domain tracking, how do I know which traffic is attributed to which website?
Let me count the ways.
Page Path Recognition
The first, and least reliable way, is page path recognition. Page path is everything the comes after your top-level domain (TLD). That would be .com, .org, .ai, etc.
So for this URL: https://gerickdigitalstrategy.com/blog/google-analytics-4/chatgpt-traffic-google-analytics-4/
I know that the page path is: /blog/google-analytics-4/chatgpt-traffic-google-analytics-4/
In fact, I know that all my blog posts will be on gerickdigitalstrategy.com and not bradgerick.com
So any time I use the page path dimension, I could try to parse out which website it’s on by knowing the content I tend to publish on each one.
But what about for other page paths that aren’t as obvious, or that are exactly the same?
e.g., /contact or /, which is the homepage for any website.
We’ll need a more reliable method.
Hostname
There’s a dimension in Google Analytics 4 called hostname.
The hostname is the full URL, including www., of the website where an event occurs.
In my case, the hostnames are www.gerickdigitalstrategy.com and www.bradgerick.com.
When analyzing data in Reports, I can add “comparisons” based on hostname dimensions.
In the screenshot below, there’s an example of what this would look like for Society for Science, which has three websites. Here are the hostnames:
www.sciencenews.org
www.snexplors.org
www.societyforscience.org
While I’m not showing you their data, on the chart below you would see everything broken out by the three respective hostnames.
You could do the same thing in Explorations by creating Segments, which could then be saved as audiences.
In fact, why don’t we just save them as audiences?
Audiences
1) Go to Admin > Property settings > Data display > Audiences
2) Click Create a custom audience
3) In the Add new condition dropdown (shown as Hostname now below), start typing “hostname” then select it when it comes up.
Now click + Add filter and add the condition “contains” your hostname.
You could also choose exactly matches, as discussed above, but you would miss out on that Google Translate traffic. It would still show up in your overall GA4 data, but not in your analysis of this specific hostname (i.e. website).
So based on how much “translation” traffic you get, or if you have subdomains, you can decide which option is best for you.
4) Select “at any point in time” for the time period and set the membership duration you want (the default of 30 days is fine). Click the blue save button.
5) You should now see your new audience in your audience list.
Instead of going through all those steps again, just click the vertical three dots and select Duplicate to create the audiences for the rest of your hostnames/websites.
6) This is what it should look like when your done.
Remember, data won’t show up for about 24 hours, and audiences are not retroactive.
Now, when you’re in Reports or Explorations, you’ll already have all your audiences created and can just select them to filter your reports.
If you have questions about anything covered here, let me know in the comments.
Google Analytics 4 Course for Content Creators
Sign up here for lifetime access to my advanced GA4 course:
Paid subscribers of this newsletter have a discount code waiting for them. All you have to do is email me and I’ll send it over.
This newsletter is self-edited, so please don’t be shy about emailing me if you spot a mistake.