Adding Google Universal Analytics...

User 399434 Photo


Registered User
7 posts

I need to install the Google Universal Analytics Event Code (https://developers.google.com/analytics … sjs/events) on various button and link events but I'm not sure how to do this with the site I created using RLM. Any examples or suggestions on how I should do this?

ex: code
<div class="coffee-span-2 column-68 coffee-505-span-6 coffee-310-span-12 coffee-905-span-4"><a class="link-button button-link-1" href="index.html" title="HOME" id="idx-Home">HOME</a>
User 187934 Photo


Senior Advisor
20,181 posts

Hi Denny,
Have you read any of these?
https://support.google.com/analytics/answer/3450662
https://support.google.com/analytics/answer/2709829
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 399434 Photo


Registered User
7 posts

Yes, but I'm still not able to make it work. I really need to see a full example on a page to understand how it is setup. They mention using Google Web Tag Manager and then they mention using this in the code. I've tried it both ways but for some reason can't make it work.
User 187934 Photo


Senior Advisor
20,181 posts

I haven't upgraded my sites to Universal yet. Maybe somebody who has will point out what to look for.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 399434 Photo


Registered User
7 posts

Ok, I figured it out. It's not as easy as one might think until they've done it before. When using Google Universal Analytics, here is what you need to do.

First of all, the fastest and best way to do this is to create a Google Web Tag Manager Account by going to "http://www.google.com/tagmanager". To see how to do this, follow the steps from this link.
https://support.google.com/tagmanager/a … 4370?hl=en or watch this YouTube video: https://www.youtube.com/watch?v=xS67okhvnOs. Also, here's a quick start guide for tag manager. https://developers.google.com/tag-manager/quickstart.

To summarize this:
1. you will need to create a Container within Web Tag Manager so that you can generate a Universal Analytics page code. This code must be added to each of your web pages just beneath the <body> tag of each page. (Note: it is not necessary to place any other code on your web pages, since Google Web Tag Manager will manage all the rest of the analytics code.)
2. Next, you'll want to create your tags and rules and select "Google Analytics" for the type of tags you want to create.
3. Begin creating tags and rules. (Note: when creating your tags you will need your Google Analytics Tracking ID.) this tracking ID is created when you open a Google Analytics account.
4. First add a basic page tracking tag and then create various listeners and rules. There are various types. I have used a Click Listener and a Link Click Listener to listen for button clicks and link clicks. The firing rule should be on all pages for both.

Here is a sample of what I did:
a. created a page listener
b. created a click listener (for listening for page button clicks)
c. created a link click listener (for listening to page link clicks)
d. created button click rules. ( {{event}} equals gtm.click) and {{element url}} contains index.html )
e. created Analytic Event Tags. (Track Type = Event, Category=Nav, Action=Click, Label = Home). Make sure your tags are using the correct firing rules that you setup for that particular event. I named them similar so that I can link them appropriately.

5. To see more about auto event tracking, view this link: https://support.google.com/tagmanager/answer/3420054 or watch this YouTube video. https://www.youtube.com/watch?v=-H_TikHFfso. This video is a little long but it really helped me setup a few event tracking items.

To check if your tags are working properly you can use the Tag Assistance tool. https://chrome.google.com/webstore/deta … efk?hl=en. Note you must use Google Chrome for this tool.

I recommend watching the YouTube videos, they will help out a lot.




User 187934 Photo


Senior Advisor
20,181 posts

Thanks for posting Denny.:cool:
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2088758 Photo


Senior Advisor
3,086 posts

Great explanation!
Taking over the world one website at a time!

Steve Kolish
www.misterwebguy.com

YouTube Channel:
https://www.youtube.com/channel/UCL8qVv … ttneYaMSJA

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.