Many people are aware that Google Analytics displays a lot of spam traffic.
This is something you already know. Google Analytics contains many “unknown unknowns”, even though you have everything you need.
Did you know that Google Analytics doesn’t track right clicks?
Think about how you surf the Internet.
Consider the PDF downloads and clicks to external sources you track in Google Analytics as Goals.
It is all wrong.
How to fix it: Use Google Analytics to track right-click events and set goals.
Phase 1 – Gathering Data In Google Tag Manager
Jules Stuifbergen has all the knowledge in this section. He is the only person who can help you set up Google Tag Manager.
No matter what your opinion is, these are the steps that we took to follow his lead and clarify.
1. Install a Click Listener Tag
This tag “listens” to your page for a mouse down at the right or center mouse button.
Now your page should be “listening” for the mouse down function.
2. Variables to the Setup Data Layer
You need to be able to capture and categorize events within the Data Layer.
These are vital for goal tracking in the future.
I like the click events in Google Analytics. I also like the link target and the link text.
Click on the data variables area.
Create the data layers variables which correspond to variables sent by the listener tag.
Pay close attention to the name you use to refer to Variables.
3. Google Analytics Trigger Configuration
After Pageview/DOM Ready has been listening to and sending the variables we want, we can prepare a trigger for our Google Analytics Tag.
Create a custom trigger for an event by going to Triggers.
Make it lighter on the non-left.link click
The Listener Tag listens for both right and middle clicks. Both will then be captured by the Regex.
We can now track clicks that are not left using Google Tag Manager…but it is not possible to do so in Google Analytics.
Jules’ post contains more information about Phase –.
Now let’s move on to Phase 2
Phase 2: Gathering and Using Data From Google Analytics.
This phase will integrate the Google Tag Manager Data Layer Variables into Google Analytics. The data will be then merged with existing left-click data to improve event click goals.
Step 1. Setup a new Google Analytics Tag
A Tag can be added to Google Tag Manager. This can be either a Universal Analytics Tag or a Google Analytics Tag.
This can be used as an Event Tracking tag.
Now you can name any category, action, or label.
Google Analytics requires you to have at least two click event patterns that match your Goals.
This difference is vital as clicks can cause a lot of noise. It tracks the mouse down but does not track clicks.
These events need to be separated.
We use URL as Action and Anchor Text as Label in our setup.
Next, match the Trigger with this tag.
If someone clicks on a button that is not left, it will move your Variables to a Data Layer, fire the Google Analytics Click event, and populate it with all the Variables.
Now we need to connect it to a specific Goal.
Step 2. Create a Useful Goal
Let’s suppose you want to track PDF downloads. You keep track of left-click downloads. Now, you need to integrate non-left clicks.
To create a goal, you will use one of the two fields that are shared by the left or non-left click events.
But, left and right clicking still refer to two distinct actions. You need to be able to segment each behavior and verify it on your website.
You can change the Event field that you left because you did it in another Event field.
*Aside*: We were missing almost 1/3 of our clicks before we set up right-click tracking.
Google Analytics data is reliable, but you need to verify it. Instead, focus on patterns and contrasts to understand what’s happening.
Another thing to think about is whether click tracking is used for downloads or advertising.
Third: This post is a specific recipe to solve a particular problem.