Install Google Analytics (GA4 & Universal Analytics) to Track Web Traffic | Plus Google Tag Manager

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to this video here we're going to cover installing google analytics so you can track and analyze your website traffic [Music] i'll share a little bit of background here so if you want to jump straight to installation go to the next section in the progress bar so in 2019 vendors who sold google analytics 360 which is google's premium version of google analytics that cost 150 000 a year we're pushing ga out plus web to ga 360 customers i remember sitting on that call with our ga 360 vendor where they informed us that google really wanted to push users to ga app plus web but for our organization it was de-prioritized to our backlog and we never made the move to actually install it in 2020 google rebranded it to ga4 and announced it as the most up-to-date version of google analytics in october so when you go to set up ga ga4 is now the default version that you'll install you can still install ga universal analytics which is the previous version that most users still probably have installed right now but the option is kind of hidden even now it's not a bad idea to install both ga4 and universal analytics and run them in parallel especially if you're used to universal analytics plus you should surely keep your existing version of universal analytics as google continues to develop and update ga4 this will give you some time to get used to the new solution we don't have a timeline as to when google will sunset universal analytics but their resources for developing new analytics features are focused on ga4 so let's set this up first log into google and go to analytics.google.com or search for google analytics and it should appear as the first result if you don't have an account already this is the landing page that you'll see so click on start measuring and begin to create your account if you already have access to a ga account go to admin and click on create account we're brought to the same account creation screen so when you create your account keep in mind that your ga account could potentially encompass multiple web properties so for example your account name could be your organization and within your organization's account you could create ga properties for your website a sub domain a mobile app or so on and so forth so we'll give this a name and take a look at the settings to figure out which one you want to enable i'm going to check off the first one because i want the enhanced demographics and interest reporting we'll click next and set up our first ga4 property give the property a name and set the correct time zone and then you're going to click on show advanced options now this is where we'll enable the universal analytics property slide this taco over to the right so that it turns blue select your http prefix and input your website url make sure that both of these options are selected because we want a ga4 property and a universal analytics property and then we want this enhanced measurement for j4 property enabled because that'll automatically set up tracking such as link clicks and embedded videos as well as a few other events click on next and you can choose to input this business information but it's optional now this is a guess but if you provide your intended uses of ga what they'll do is employ their ai to provide you with insights that are tailored to your experience again just a guess but we'll click on create and it'll bring us to the terms of service which we'll have to accept in order to proceed instead of creating a reporting view like you did with universal analytics we're brought to this screen with web stream details we have the url the name and measurement id at the top go ahead and copy the measurement id because we'll need it for later there's the stream id the status and then the section for enhanced measurement and this is the same enhanced measurement that we were talking about earlier when we were first creating our account and property so you can see exactly what will be automatically tracked when you turn on this enhanced measurement if you don't want any of these you can click on the gear settings here and toggle off the ones that you don't want go to the next section with tagging instructions here we'll go through a couple scenarios the first two will cover adding new tags to your website and then if you already have tags on your website we'll cover modifying your existing tracking to add the analytics tag directly to your site click on global site tag copy the code that appears and go to your html find the opening head tag and paste the code that you copied the second method is to add the analytics tag using a tag manager like google type manager or gtm for short it's a great way to manage your tags especially if you're not a developer you can manage tags for advertising other marketing tools creating customized tracking and validating data you're tracking all without developer resources go to techmanager.google.com and once the page loads you'll see that you'll need to create a new account so the account structure for gtm is similar to what you'll have in ga so the account name can be your organization name and the container can be similar to what you named your properties so the target platform that you select is the type of web property that you're tracking so click on create accept the terms of service then you'll see the instructions to install gtm so copy this first snippet of code go to your html we'll remove the snippet from the previous example and we'll paste our code as high up in the head tag as possible go back to the instructions copy the second snippet of code go to the html find the opening body tag and paste that snippet of code right after the opening body tag there close this out and in this overview section click on add a new tag click in the tag configuration and choose google analytics j4 configuration go back to the tagging instructions in your ga tag now that you have the gtm code in your html click on use existing on-page tag and copy your measurement id go back to your gtm tab and paste your measurement id in that field we'll leave this option marked because we want that page view event to fire and send to ga next we'll set up the trigger that will fire this tag so click in the triggering section and choose this all pages trigger so this tag will fire whenever a page loads and we'll name this tag ga4 configuration and save it now we can see if our tag works but in order to do that you need to be in a chrome browser and you'll need the tag assistant by google chrome extension so go to the chrome store and install that extension when you're back in gtm click on preview and publish the empty container so once the container is published click on preview in the model or the preview button next to the submit button in the top right then what will happen is a new tab will load where you'll input your url for the website so once you do that click on start this will load the next page as well as a new tab with your website and you'll notice in the url that it has this gtm debug parameter so you can differentiate that page view in your ga and here on this page we'll see in the lower right corner that the preview mode debugger has been connected if you go back to the previous tab you'll also see the same success indicator if it hasn't connected you'll see the progress bar load only halfway or a message saying that it failed to connect if that's the case go back to the tab with your page your website and click on the tag assistant extension and what you might see is a button that says reload so click on that button and that should enable you to connect to the preview mode go back to the other tab that loaded click on continue and what you'll see here is that tag assistant shows you the tags that are fired and the tags that happen this shows us our ga configuration tag fired successfully we can go to ga4 to validate this as well in your j tab click out of this and click on the clock icon you'll see the real-time report load and look at that there's our page view event right there next go to your ua property so you can connect your g4 account that way you can send data to both properties before you do that make sure you've copied your ga4 measurement id now click on the drop down menu at the top choose the account you want and under properties and apps you'll see your ua property your ua property will have your ua tracking id note that only your ua properties have a tracking id that begins with ua in the admin section under the property column click on tracking info and tracking code scroll down to connected tags click on the down arrow on the right and paste your j4 measurement id now click connect we already added the ga4 configuration tag on the website but if you're adding completely new tracking to your website you still need to add the universal analytics tag so click the x go to the global site tag section and copy the code go to the head tag in your html and paste it directly below the opening head tag as the first item you can also install it using gtm so let's remove this code snippet from our example go back to your tracking code section in the ga admin find the ua id at the top and copy it in gtm create a new tag selecting ga universal analytics as a tag type keep it as a pageview tag and configure the ga settings by creating a new variable paste your tracking id in the appropriate field and you can name it ga ui settings variable save it and now create the trigger similar to the ga4 configuration tag use an all pages trigger you can name this tag gaua pageview tag then run another test to validate that both properties receive the data so let's click on preview make sure the url is correct check that the debugger is connected and go back to the tag assistant debugger tab we see that both the ga4 configuration tag and the ga ua page view tag have both fired check the real-time reports for both properties there's the page view there so check that off and in the other property we have the page view there as well so check and check there it is we have the initial tracking working leave a comment if you're planning to install ga4 or if you've already installed ga4 what your experience has been with the setup and if you found this helpful please like subscribe and share the video this way together we can cover key aspects to help you build track and improve digital experiences thanks for watching see you in the next one
Info
Channel: Growth Learner
Views: 1,153
Rating: 5 out of 5
Keywords: Google Analytics, Google Analytics 4, GA4, Google Tag Manager, GTM, digital analytics, web analytics, Measure
Id: dtv2LHFD7h4
Channel Id: undefined
Length: 16min 48sec (1008 seconds)
Published: Wed Apr 21 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.