In this episode of the Truelogic DX podcast, we dive into the technical aspects of setting up Google Analytics 4 (GA4). Hosted in a hybrid webinar format, we provide step-by-step instructions on how to transition from Universal Analytics to GA4, with a focus on installing GA4 through Google Tag Manager.
We explain the importance of the measurement ID in GA4 and how it differs from the UA ID used in Universal Analytics. For those involved in the technical setup of analytics, this episode provides valuable insights and guidance.
Berns San Juan: Hi, and welcome to another episode of the Truelogic DX podcast/webinar, where we’re doing sort of a hybrid webinar format, because we need it to be visual when it comes to explaining your transition, hopefully, into GA4. Well, actually, not hopefully. You don’t have a choice. You have to move to GA4. Okay, so in the first portion of this conversation, what we focused on were the most common reports, how you navigate, and what user data are you able to access from Universal Analytics into GA4. And we talked about how the data to who your audiences are, where they came from, what they did, and what meaningful action did they took are present in both.
We also talked about how now audiences are users. The acquisition is still acquisition. Conversions are now monetization. So today we’re going to talk about, how you set up your GA4. And I think for most people that I’ve talked to, I try to remind people I am fond of installing GA4 through the Google Tag Manager. And so that’s the process that we’ll go through. We’ll briefly touch on what you need to do if you want to install it directly.
But this is, in short, the nosebleed stuff. This is the more technical portion of the conversation. If you are not involved in the technical setup of your analytics, feel free to skip this webinar and move on to Episode 3. But for those of you, if you guys are SEOs, marketers, and web developers, and you are involved in the setup of your analytics, this might be the episode for you.
Installing GA4 through Google Tag Manager
To understand the difference between the setup between Universal and Analytics, I’m going to show you briefly how Universal used to be installed, right? So for you guys to set up your Universal Analytics, the piece of information that you needed was your UA ID. So it’s this piece of information over here if you’re looking at my screen. So, you used to go to Setup Assistant, you go to Property Settings, and then you captured the UA ID. This is by far the most important, actually not by far, the only relevant piece of information that you need. You need the UA tracking ID to have installed Universal Analytics on your website. Once you do that, you go to Property Access Management, you go to Tracking Info, and then Tracking Code, and you capture this section.
You capture the gtag.js, you capture this and then you paste this on the head section of the HTML of your page. Like, so you paste this in the header section. So you typically go, like, if you’re in WordPress, you could go, you could use a plugin or you could go into the HTML editor of your website and insert this code. And then voila, like Universal Analytics is installed.
Inside UA, it’s a bit different. So inside UA, you have to go to, you have to click on settings here at the bottom. So, you click on settings at the bottom, and then it will take you, you go to admin, and you will go to the admin section over here. And then from the admin section, under properties, you click on data streams. So this is what you need to click on. When you do, your screen will transition to this, and then what it will say is, okay. What data stream do you want to add? You click on it. In this case, I click Truelogic.
And what you’re going to see is this, the measurement ID. So the UA ID is Universal Analytics and the measurement ID is GA4. So remember that it’s not your stream ID, or whatever other identifier that is important. In Analytics 4, your most important ID is your measurement ID. So I’ll repeat that. Your most important info, your most important piece of information, or your identifier for your GA4 is your measurement ID. It even comes with this very thoughtful copy functionality. So, if you want to copy it to install it, then you just do that.
Once you’re done, you then head on to Google Tag Manager. Now, there are multiple ways that you could install Tag Manager onto a website. Because there are a lot of frameworks. Like if your website is Wix, Squarespace, WordPress, or Shopify, like the installation is all very different. But for this webinar, I’m going to walk through the most popular one, which is WordPress.
Why do you need to use Google Tag Manager?
Tag Manager just detects what that ID does, where it goes, what floor it goes to, and so on. Whatever Tag Manager detects, it throws the data into GA4 and GA4 records. Tag Manager just throws data at GA4 and GA4 records the data. GA4 does not sit on the website.
You’re not installing, I don’t know, 40 CCTVs on the building, which is your website, tracking the movement of all the users. So, this is why I’m a fan of Tag Manager. The second reason I’m a fan of Tag Manager is I don’t tend to use the default events. Events are meaningful behaviors, content, and activities that users do inside the website. And I’m not a fan of the default events inside GA4. There are default events. And if you’re a catalog website, if you’re a publisher, you don’t need more than those. But take, for example, by default, a page view, like a visit to a page is an event, it gets tracked. And so if you just use the default events, what you’re going to wind up with is a thousand users, generating 2,000 sessions, triggering 4,000 events.
That’s not very helpful data. And so I’m not a fan. And so what I tend to do in Tag Manager is I only use tags that I specify inside Tag Manager. But this is the reason, this is the whole rationale behind why we use Tag Manager.
Okay now, in WordPress, and this is WordPress, in WordPress, if you’re going to install GA, it’s super simple. You just have to click on GA4 analytics. And what I tend to do is I use a plugin that’s called Google Tag Manager for WordPress or GTM4WP. It’s by a guy named Thomas Geiger. I would recommend you review it first if it’s for you. It’s got tons of downloads. It’s got great reviews. But this is a plugin that I like to use. So in WordPress, I installed a plugin called Google Tag Manager for WordPress. And then I now go into Tag Manager itself.
In Tag Manager, I go to Overview. I click the Admin section, and then from the Admin section, I click that plus. When I click that plus, it will then ask me, so you’re trying to build a container, what kind of data are you trying to capture? What kind of data are you trying to throw into Analytics 4? Here, what I’m going to do is I’m going to pick Web Data. I’m just going to pick, Web and then I’ll put in the website that I want to put in. Once I do that, I will then click this, the Tag Manager ID, and here it will tell me, okay, you want to install Tag Manager? The one way to do that is to capture this and paste this at the head section of your HTML and then capture this script, and then paste it in the body HTML of every page that you want Tag Manager to exist in. So it’s pretty tedious. Installing the head HTML is done once because whatever you install in a head, the head HTML is uniform throughout a website, but the body HTML is not.
The body HTML of every page is unique. So, instead of going through this process of capturing this code, installing it in the head, capturing this code, and then installing it in the body HTML of every page you want to track on Tag Manager, instead of doing that. What you can do is you can go back to WordPress, and remember the most important piece of information on Tag Manager, so we’re not talking about the measurement ID in GA4. The Tag Manager ID, you just capture the Tag Manager ID, you go to Google Tag Manager for WordPress, and then once you go to GTM4WP, you go to General, and you enter the Tag Manager ID. That’s the Tag Manager ID. You enter the Tag Manager ID. Inside Tag Manager, what you do is enable the GA4 configuration. Inside Tag Manager, you go to GA4. Again, you’re in WordPress. So, you create a Google Tag Manager account. After you go to the Google Tag Manager account, you create a new container.
The new container contains all Web Data. Once you’re done with that, you copy the Tag Manager ID. Once you’re done with the Tag Manager ID, you go to WordPress.
So let’s go to WordPress. So you go to WordPress. You install the Google Tag Manager for WordPress. Inside Google Tag Manager for WordPress, you add the Google Tag Manager ID. Once you’re done, you publish, you then go back to Tag Manager, and inside Tag Manager, you click on a new tag type, which is just you making sure that you can throw data at Analytics. I think you might get confused that by installing Tag Manager, you have automatically installed Google Analytics. No. When you install Tag Manager, you have to connect Tag Manager to Analytics, which we have not done yet. We haven’t done that yet. Remember that all we’ve done at this point with GA4 is we copied the measurement ID. That’s all we’ve done. To connect Tag Manager and your GA4, you click on GA4 configuration. After you click on GA4 config, just go back to your GA4 and make sure you’re copying the right measurement ID. This is this section. Copy that.
Remember not the stream ID, the measurement ID. Go back into your Tag Manager and paste your measurement ID. Once you’ve pasted your management ID, press this button. And then it’ll say, “Okay, what kind of data do you want me to capture?” So it can look like a lot. For now, just click on All Pages. For now, just click on All Pages. This is all you want to do right now. You can do the more complex setup later. And that’s not this webinar. We teach analytics at the Digital Marketing Institute, and it’s a four-hour lecture, and even that’s not enough, right? And we’re trying to capture a setup in like 20 minutes. Okay, so you clicked on the button, your tag manager and your GA4 are now talking to each other, and the default setup that you did is all pages, meaning any activity, any event, any conversion that happens on the page, Tag Manager is now able to send into your GA4.
You go back to Tag Manager. Once you do that, you will click on Submit. Once you click Submit, it’s not easy to make a mistake inside Tag Manager and Analytics. What they do is they try to make sure, are you sure? You do that. And now Analytics 4 is saying, okay, how are you adding Tag Manager to the website? Or are you installing it by pasting the HTML? And in this situation, you don’t. You’re not going to install it manually. We’re going to skip that. What we’re going to do is you’re going to publish the change, and then you’re going to finish the setup in WordPress. Once you’ve pasted the GA4 measurement ID in Tag Manager, you click on Save. You click on Publish. You say Publish and Create Version. So you hit save and then you publish. You hit save and then you publish. And that’s pretty much it. You would have been done with Tag Manager.
What you’ll realize now is when you go to your GA4 and you open the real-time report, you see when there’s a user inside your webpage and so on. And you start seeing all of your beautiful traffic data inside your website. So you start seeing this. If this is blank, by the time you set up Tag Manager, the setup is incorrect. Tag Manager is not throwing web data at your analytics.
That’s it for this section. Thank you for bearing with me on this nosebleed episode of Truelogic DX. Join me next time when we’re going to demystify what data you’re looking at inside analytics. Thank you and see you, at the next one. Truelogic DX is available on Spotify, Google, and Apple accounts.