Cross-domain tracking in Google Analytics 4 (2021) || Track users across different domains

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if a business operates across multiple websites with different domains and those websites are a part of the same user journey you have to do some additional configuration in google analytics and in this video i will show you how to configure cross-domain tracking in google analytics 4. [Music] hey my name is julius and welcome to analytics mania youtube channel where you can learn google tag manager and google analytics and if you want to stay up to date with google analytics 4 consider subscribing before we jump into the configuration of the cross domain tracking there's a very important thing you should know if your business operates on multiple websites but they are using the sub domains of the same domain that is not cross-domain tracking google analytics 4 handles that automatically cross-domain tracking involves only completely different domains alright so since we got this clear let's jump into the actual configuration first i want to quickly explain the problem that cross-domain tracking solves let's say that my business owns two websites that have different domains the first one is gtmcourse.shopify.com and the second one is analyticsmania.com now let's say that i have a visitor who landed on the first website and google analytics automatically stored a cookie on that visitor's browser now somewhere on this myshopify.com website there is a link that the visitor clicked and that visitor was redirected to my second page i mean second website and this website is the part of the same user journey on this website google analytics is also activated but since this is a different domain the cookie value is also different this is happening because google analytics on this domain cannot access the cookie that was stored on this domain so even though the vistor is the same google analytics treats this as a new different user and this becomes a problem because instead of one user your reports will now show two users but thanks across the main tracking configuration it is possible to solve this problem so here's how cross-domain tracking will work in a nutshell a visitor lands on the first website and on this website some cookie is stored then when a visitor clicks the link on this page that redirects to this website the url will be automatically decorated with some cookie information and then on this website google analytics will take that information from the url and will automatically update the cookie as a result the same visitor on both websites will have the same value of the cookie obviously these cookie values are just dummy fake data and in reality they might look completely different in order to properly configure cross-domain tracking here are the things that you must complete first of all all websites must use the same google analytics property so this means that website a and website b must be using the same google analytics four property then the next thing is to configure cross-domain tracking in the google analytics four interface now if you're familiar with the graph domain tracking in universal analytics you also might be thinking to configure the referral exclusion list however this is not needed in ga4 because google analytics 4 handles self referrals automatically if those domains are configured in cross domain tracking setup so let's go to google analytics click admin then choose data streams choose your website's data stream and then click more tagging settings here you should click configure your domains now click on this pencil icon and then add condition the first condition could be for my first website which is gtm course my shopify.com and then the next condition could be for analytics mania.com so when i enter a domain like this this will cover www.analyticsmain.com then let's say blog analyticsmania.com and all the other subdomains that belong to this domain right here if you want you can write even more complex conditions by using regular expressions now click save and then let's test the setup so here i have the website on gtm course at shopify.com and on this website i already have google tag manager installed and within my gtm container i have g4 configuration tag so here i can just refresh once again just to be sure that everything is fresh and new and now on this domain i click this link now i am redirected to my second page and as you can see the url has been decorated with a bunch of different parameters these parameters allow google analytics on this website get the cookie information that was available on this website therefore the value of the google analytics cookie will be the same on both domains in fact we can check this so i can go to more tools developer tools then go to application then choose my domain and now i am on my first website and then i will enter underscore ga and here i will see that the value ends with zero three seven four now if i click on this link go to the second website and check the cookie there you will see that its value right here is the same and it ends with zero three seven four and also we can test this with the ga4 debug view so to do that we should again go to the first website and then you should install the google analytics debugger extension i will post a link to that extension below the video so to enable this extension you should just click it and the page will reload and eventually you should start seeing your device and the debug view of google analytics 4. however it might take some time to appear here please ignore this event this is just a test from my another experiment and now as you can see we have one debug device now if i go to this another domain and if cross-domain tracking is configured properly i should still be treated as that very same device but if we see the second device this means that browser mean tracking is working incorrectly or in other words you have done something incorrectly so let me click this link i'm now on the second domain and by the way if i click this page view you will see that page location is first domain and here is the second page view and if i click it you will see first of all that the device count is still one and here the page location is the second domain and also we have a parameter that was automatically added by ga4 which is ignore refer so this was added here because we have configured both the mains and the ga4 across the main tracking settings and because of this google analytics 4 is capable of identifying self-referrals and removing them from the reports so what does it mean is that the first domain will not appear in the traffic acquisition reports right here and that is how you should configure cross-domain tracking in google analytics 4. if you have some experience with cross-domain tracking in universal analytics you will notice that in ga4 things are much easier if you found this video useful hit the thumbs up button below the video because it helps me continue working on this channel also if you want to learn more about google tag manager or google analytics 4 consider subscribing to this channel my name is julius this is analytics mania and i'll see you in the next video [Music] you
Info
Channel: Analytics Mania - Google Tag Manager & Analytics
Views: 5,889
Rating: undefined out of 5
Keywords: Ga4 cross domain tracking, cross-domain tracking, google analytics 4 subdomain tracking, define your domains in google analytics 4 Google analytics 4 tutorial, google analytics cross domain tracking, referral exclusion list google analytics 4 web analytics, digital analytics, cross domain tracking, cross-domain tracking with google tag manager, subdomain tracking, google analytics 4 tutorial, google analytics tutorial for beginners, cross domain tracking google analytics
Id: u4kBqTijBVo
Channel Id: undefined
Length: 7min 1sec (421 seconds)
Published: Tue Mar 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.