Easy Quick Guide: Install Google Analytics 4 Directly in Your Website Code with Existing UA Account

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's going on here we're going to cover the case where you already have a universal analytics property set up but you're looking to create a new ga4 property start by going to the admin section of your google analytics account and if you look under the property column you might see an option that says ga4 setup assistant that is if google has made it available to you you want to go to that section that says i want to create a new google analytics for property and click on get started a light box will appear telling you that the wizard will bring you through the steps to create a ga4 property which includes copying the basic settings from your ui property and activating enhanced measurement that includes automatically enabling tracking for events including page views scroll tracking outbound link clicks site search usage video engagement if you have any videos on your site and file downloads there is an option to enable data collection using your existing tag but that's only available if you're currently using the gtag javascript for your ua tracking i did some testing and so far i've only found one case where that option is actually available and that happens to be when the ga4 property is already set up and connected to a ua property site tag but the case we're covering in this video is one in which we don't even have a ga4 setup yet so it looks like that's a bug that needs to be worked out if you do have that option available there are some considerations in google's support page their support documentation that you need to be aware of mainly that not all tracking will transfer from ua to ga4 and there's a link in the description for that page click on create property and it automatically sets up a ga4 property and connects your ua property to this new ga4 property as you can see in this green text at the top next to the title click on see your ga4 property once it loads it also indicates that this ga4 property is connected to your ua property if you scroll down you can see sections for data collection there's tag installation custom event measurement tracking user ids and enhanced measurement there's also section sections for property settings linking audiences conversions and user management we're only going to cover tag installation but you'll definitely want to take a look at the other settings so you can get it you can get your ga4 tracking up to speed with your ua property tracking click on tag installation and you'll notice in the property column to the left it highlights data streams so that's where you can find the settings in the future click on this data stream that was just created when you set up the ga4 property it opens up the details and you can see the stream information at the top we'll go to the tagging instructions section and click on use existing on-page tag since we're talking about tags that were installed directly on the website click on google analytics we'll cover the google tag manager case in another video if you're interested these instructions cover the simplest way to start data collection for ga4 there's another way i'll go over which isn't that difficult either but copy the measurement id from step four click out of this pane and go to your ua property [Music] which will be noted with your ua tracking id click on tracking info and tracking code click on connected site tags and paste your ga4 measurement id that you copy and click connect you can test your site to see if your data shows up in both properties but i warn you it may take some time for connected site tags to register for the ga4 property honestly i don't know how long it would take in one test i was looking at connected set tags and i got frustrated i ended up getting something to eat try the next method that i'm about to show you then i thought why don't i try testing the connected tag method again and i found myself a pleasant surprise with the connected site tags working i've also ran tests where the real time reporting for ga4 was more responsive so let's load the site go to the real-time report in ga4 and see what ga decides to give us today okay so it looks like the data for ga4 is coming through now we can check the reporting for our ua property and the data is there as well the second option is to add a new config directive you can find what i'm going to share with you in the second link in the description of this video for ga4 implementation guide for gtag.js on that page this method is listed first but in the ga settings they probably wanted to just provide users with what's supposed to be the more simple option anyway to add a new config directive go to your code find the gtag code snippet which should be right after your opening head tag copy the existing config line and paste it right underneath that line so for the second line you'll replace that ua tracking id with your ga4 measurement id find the measurement id by going to your ga property settings remember this is in your data stream details and the measurement id is also at the top so copy that measurement id go back to your code and replace the second ua tracking id and don't forget to put that measurement id in single quotes the numbers the characters that you see here is just how the code renders special characters [Music] now let's go and test the tracking just remember that it could take some time for the real time overview to process and report the data in ga4 i've seen some delays around 30 seconds sometimes what i'll do is refresh the report to see it come through and it looks like we're experiencing some delays here so first of all go check the ui property and there's our our page view coming through and let's check back with the ga4 property and finally there it is all right if you found this video useful if you want more insight on taking on this digital analyst role whether it's for your own website or for your own company organization if you're looking for insights into user behavior to improve the experience of your website or web product like this video and subscribe to the channel until the next [Music] episode you
Info
Channel: Growth Learner
Views: 130
Rating: 4.3333335 out of 5
Keywords: Google Analytics, Google Analytics 4, GA4, digital analytics, web analytics, Measure
Id: FYd52md0ibE
Channel Id: undefined
Length: 9min 24sec (564 seconds)
Published: Mon May 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.