arnold on Apr 07, 2019
First, Make sure you are signed into your Google account and go to tagmanager.google.com
Then click On “Add Account”
Fill out the form similar to the image below
Next you will have to accept the terms from Google to continue.
You will then be given access to the Google Tag Manager Code For Your Account:
We will need to install the code on every page of our website as requested by Google. We also need to split up the code and install it in different sections of each page.
To install this code properly we need to go to the dashboard of our WordPress websites.
Once logged in go to APPEARANCE and then EDITOR as shown below.
If you get a warning message then just click I UNDERSTAND.
You will then see the editor section of your dashboard. On the right hand side you will need to select the theme to edit. Since we are using mesmerize that needs to be selected. Scroll down until you find Theme Header and click on that to open up the header code.
You should see a screen that looks something like this:
Now we need to simply copy our Google Tag Manager code into the editor. Go back to the tag manager and copy the header code and insert it as shown below. Then copy the body code and enter it as shown below.
Once you click UPDATE FILE it will install the Google Tag Manager scripts into your website.
However, we need to install the GTM scripts one more time because MESMERIZE uses a separate theme file for their homepage. Click on header-homepage.php on the right. Then insert the code one more time as shown below. Then click “Update File” one more time.
Now you can go check the code. Go to your homepage on your website and right click on it. Then select VIEW PAGE SOURCE and you will see the code on your website. Look at the header code and you should see your Google Tag Manager code as shown below.
Sign Up For A Google Analytics Account
The next thing we need to do is set up our websites in Google Analytics. Sign up for a Google account if you do not have one. If you have Gmail then you have a Google account. If you need a Google account then go to this link: https://accounts.google.com/SignUp and get signed up.
Do not use your CSU email or email account. It will cause you a lot of problems later in the semester. Make sure you are using a @gmail.com account.
Now go to: https://analytics.google.com/
Click Sign Up:
Get signed up like this example:
Then Click “Get Tracking ID” and accept the privacy notification that comes up.
This will take you to a page that contains the following information: You will need your UA code later so copy that to save time later.
Once your analytics account is set up and you have your UA code you now need to return to Google Tag Manager to set up your Google Analytics tag. In your Workspace select ADD A NEW TAG.
On the next screen give your tag a name. We are creating a Google Analytics Pageview tag that will be installed on all pages. So that is how I named the tag, Once you name the tag click on CHOOSE A TAG TYPE TO BEGIN SETUP as shown below.
Then on the right sidebar when it asks for tag type select GOOGLE ANALYTICS – UNIVERSAL ANALYTICS.
In the Tag Configuration you need to leave the Track Type as Page View and then select NEW VARIABLE in the settings box.
In the screen that pops up you will need to enter your UA code as shown below. You also need to give it a name. I just used the US code as a name and then I clicked save. If you don’t know how to find your UA please continue to the next step for instructions.
To find your UA code go to Analytics.Google.com. Then Go To Admin which is in the bottom left. Then select PROPERTY SETTINGS and you will see your UA code which you can copy.
We have one last step which is the select a trigger.
Then select ALL Pages as shown below:
Your final configuration should look like the image below. If it does click SAVE.
Now we just need to submit our changes. In the top right of your workspace click on SUBMIT.
Fill out your settings similar to the image below:
Next we need to check that our set up worked. We can do this by going to google analytics and checking our real-time traffic.
How To Check Real Time Analytics In Google Analytics
The next thing we need to do is to check to see if analytics was installed correctly.
Let’s go back to our analytics and look on the home page.
If you click Real-Time and then Overview you will be taken to the real time screen. Load your website from a mobile phone and you should see your traffic appear:
If you see this then you know your analytics was installed correctly!