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!
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
- How to work out the monetary value of a conversion easily
- Get access to my personal custom Google Analytics report
My previous tutorial will 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 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 Google Analytics event tracking to track affiliate links-
The default 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-
<a href="/get/ahrefs/" onclick="_gaq.push(['_trackEvent', 'Affiliate', 'Ahrefs', '/tools-of-the-trade/']);">Ahrefs</a>
Everytime someone clicks on that affiliate link, Google Analytics will log it was an affliate 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 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.