Draft Version 2 – 08/20/2021
Installing Google Analytics (GA4) and Tag Manager on WordPress.
If you don’t have a Google Analytics account, you would want to go here.
http://analytics.google.com/
You will likely find a simple registration process, and you’ll get
a snippet of code that would place on website pages.
For these tools to become what is a conversion calculator you should set up the following.
- Goals and events
- Set up your Ecommerce module
Note: Accounts likely contain different properties depending on how many websites or applications you want to track for example.
Create Your Properties: a property is a website, mobile application, or device. In the older version of Google Analytics (Universal), properties could only collect data from websites.
The new Google Analytics 4 can collect data from websites and mobile applications.
Create Your Data Stream (GA4 only): a data stream is a data source and each property can contain different data sources.
For instance, you can connect a website and an app (two data streams) within the same property.
Install Google Analytics: once the steps above are completed, you’ll need to add a bit of code to your website to complete the installation.
Next we will select the GA4 Setup Assistant which is located under Property.
Note that the “Google Analytics 4 Property Setup Assistant
Not Connected
We now will select “Get Started”
We now will need to create a property. Select Yes
Note: Enable data collection using your existing tags
Now we are connected. Verify that the Google Analytics 4 Property Setup Assistant shows green. “Connected”
Now we need to select See you GA4 Property and complete the configuration
Now we want to complete the Tag Installation. Click on Tag Installation.
Now we need to validate the datastream. S
Next, we will see a screen similar to this. Select “Use existing on-page tag”
We now need to copy the Measurement ID since we will need to enter in Tag Manager.
Now go to Google Tag Manager and Add a new Tag if you have setup a container for your site. If not continue on.
WordPress Installation for GTM Code
If your using WordPress, you may want to use a plugin for headers and footers if you’re not use the “Site Kit by Google”.
For example, I installed the WPBeginner version. “There are numerous ones available, but as always check the reviews and last updates.”
After you install the Header and Footers we now want to go to the Header and Footer page. Select Settings > Insert Headers and Footers.
Next, we need to go to Google Tag Manager to copy the code to insert into the header and the body
Select the “Create Account” button on the top right.
We know need to setup a GA4 Container. Note that we are only creating a container right now.
You want to collect the Account Name – Basically Customer or Yoursite, Container is you web address and what type of platform.
Below is an example of an affiliate web site setup
Next will be some disclosures
Select Yes and accept if terms are acceptable.
Now we can copy and paste out code. You will receive a pop up with code.
Now go back to Wordpress Headers and Footers and paste the code in the specific header and body.
Make sure you save the code by selecting the Save button which is below the Footer.
Now go back to all account in Tag Manager and you will see you have your container.
The next thing we want to do is create a Tag.. Lets go back into the container we created and create a global tag for the website.
We would want to select under the New Tag panel “Add a new tag”.
When we select create a new tag it will bring up the following box. Select the “Tag Configuration” to get started.
When we select the Tag Configuration it should bring up a tag type similar to this. In the case of GA4 we will select the Google Analytics:GA4 Event
Before going to the next step, we need to grab out “Measurement ID” from Google Analytics.
This would be under Property > Data Streams in GA Admin Panel.
After going to the Admin Panel and then proceeding to Data Streams you will need to select the data stream that you will use.
This will bring to the following menu. Select the “Existing on page tag” and then select Google Tag Manager.
Copy the Measurement ID. This is what you will paste into the tag configuration.
Now leave the GA page open, we will need to enter the Tag information shortly.
Now go back to Tag Manager
Next select the Event Name by selecting the icon that looks like a block with a plus sign and add the MeasurementID. (Measurement ID is under
The Tag Configuration is complete but we need to now configure the “Triggering”. Select the
Triggering Box.
After selecting the Triggering box, select the “All Pages” trigger.
Now we have both the Tag Configuration and Triggering done. We just need to enter a name up in the top left corner and then select “Save”
After submitting the Tag, we can now go back and check in the Workspace. It shows there is 1 Workspace change. .
We know need to submit the change in the Workspace. To do this select the “Submit”. (You may want to preview before)
Next enter the Version name and select “Publish”
After submitting you should see the following version summary
Lets Verify is Google Tag Manager can actually connect to the website. Select the Preview button in the container workspace as shown.
You will now be prompted to enter the website name.
If it works, Great news . You installed the code correctly and configured your tag/container properly! GTM will go the webpage and at the bottom popup a Tag Assistant Connected.
After completing these steps you now should go back to Google Analytics and validate in the GA4
Go to the Reports Snapshot in GA4. Then open up a browser and connect to the webpage. You should see a User pop up in the Real Time block