A lot of you have asked me how I track things like affiliate link clicks, email signups and such things with Google Analytics. The short answer is with Google Analytics event tracking!
So I decided to put a quick Google Analytics event tracking tutorial together to show you how you can do the same.
What You Will Learn
- How to track anything with Google Analytics
- Including affiliate clicks, email sign ups, shopping funnels & more
- How to setup event tracking & goal tracking
- All of my Google Analytics event tracking best practices
- How to work out the monetary value of a conversion easily
- Get access to my personal custom Google Analytics report
My previous tutorial will also teach you how to increase traffic with Google Analytics.
Google Analytics Event Tracking Tutorial
Don’t worry it is much easier than you think! Just follow along with my live Google Analytics event tracking example-
Essentially you can track anything that happens on a website from someone click on a link to someone converting as an email subscription.
Here is a basic example of how to use event tracking to track affiliate links-
The default Google Analytics event tracking code looks like this-
onclick="_gaq.push(['_trackEvent', 'category', 'action', 'label']);"
We want to replace 3 values-
- Category – The category/type of event, e.g. Affiliate Click
- Action – Give the action a name, eg click (I use affiliate programme name here)
- Label – Anything else you want to include (I use the page URL)
So track an affiliate link click for Ahrefs on the tools of the trade page it would look like this-
onclick="_gaq.push(['_trackEvent', 'Affiliate', 'Ahrefs', '/tools-of-the-trade/']);"
Now we just need to add it to our usual affiliate link that looks like this-
Which ends up looking like this-
Everytime someone clicks on that affiliate link, Google Analytics event tracking will log it was an affiliate link click for Ahrefs and the page it came from.
Please see the video for more detailed setup instructions and learn how to track other things like email subscriptions, signups & shopping carts!
Custom Reporting With Events & Goals
Once setup you can create custom reports that tell you a bunch of things like-
- Which traffic source sent the most opt in conversions
- Which page converts the most affiliate clicks
- Which affiliate program is performing the best for which traffic source
This is what my custom Google Analytics event tracking report looks like (you can get it below)-
Straight away you can see 10.9% of traffic from the WarriorForum signs up to my email list while only 3.4% do from TrafficPlanet.
Equally you can see 46.1% of YouTube traffic clicks an affiliate link compared to just 25.8% from BlackHatWorld.