- In this session, we're going to look at cross domain tracking in GA4. Let's dive in. I'm going to set up the
cross domain tracking on two different sites, a demo site, and also an old site
that I have lying around that is no longer used, but it will be useful
for this presentation. The first thing I'm going to do
is show you what it looks like before we have cross-domain
tracking set up. So to do that, I'm going to
turn on the Chrome extension the GA Debug, and I'm going
to refresh the schedule page, and then let's take a look
at what's happening in GA4. I'm in the debug view, you can see that there've
been two page views. So the first one, is the
demo one, the coffee site, the second page is the hot
damn band Wisconsin site. So you can see that both properties are sending page views
to Google Analytics. I also want to show you something, I have a link on the bottom here that goes from this coffee shop to
the hot damn band site, and cross domain is not set up yet. So when I click on this
it should be tracked as an outbound link in GA4. It does call up the schedule. Let's bring up GA4. There's my click, and it's
going to show as outbound, which makes sense, right? We have one domain titanclient, going to hotdamnband Wisconsin. So that is an outbound
click from this website. Now let's set up the
cross domain tracking. Back in GA4 we're going to
go into the admin section, our data streams, choose the one we want, and now go down to
"More Tagging Settings". And here's where you set up the domains. I'm going to add those two domains. You have many match type
options: contains, begins with, matches RegEx, which is great. We're just going to use the "Contains" and I'll quickly set up those two domains. A word of caution here before we save. If you happen to have
cross-domain tracking setup in your older Universal
Analytics properties then take a look at this warning. What it's saying is that
you want to make sure you're doing cross domain
tracking on the same domains in what you're about to set up in GA4, and in what you've done in
Universal Analytics before. You basically want to make
sure the cross domain tracking corresponds *exactly* between
GA4 and Universal Analytics. Now I'm going to save, I've saved that, I'm going to go back to my debug view and then back to my sites. Now I'm going to click on the cross domain and this should be cross domain this time. And we can see it is because we now have a new query parameter of _gl which indicates it's cross domain. And if we look at what's happening in GA4, we have the original page
location on the demo site, here's the second page view, which is the hot damn band
one with the gl, the _gl. And notice that there's no click here because we set this up
as cross domain tracking that outbound click is not recorded because it's not outbound anymore. In a nutshell, that's how you set up cross domain tracking in GA4. It's way easier than it
was in Universal Analytics, and now you know how to test it and make sure it's working. Have fun, let us know if
there are any questions.