Part 1: Developing a Custom CTR Tracking System for My Niche Website

This is part 1 of my niche website experiment. My goal is to see if I can increase the CTR on my Amazon affiliate links and make overall improvements to my website based off the data I collect. I am going to be setting up a custom CTR tracking system on my Amazon niche website and running tests, A/B split tests, and making other optimizations based off the data I collect. I will also be data mining my buyer’s guide to find out what brands, models, and features people are the most interested in, and then making further optimizations based off that information as well.

At the bottom of all posts in this series will be a table of contents for your convenience.

To the Drawing Board!

To start out I wanted to figure out everything I need to track in order to get a clear picture of exactly what links are being clicked on, and what parts of the site are performing well or under performing. I figured it would help me avoid making mistakes when I set up everything. Boy was I glad I did this! When I finally had it all planned, I realized that it would now be a lot easier to set up and save a lot of time since I already had the blueprint in front of me.

Here are the basic steps I came up with.

  1. Decide what my goals are. What exactly do I want to accomplish with my optimizations?
  2. Figure out exactly what I need to track to reach valuable conclusions about the data I study.
  3. Implement the complete tracking system.
  4. Gather and study the first set of data to use as my base. 

I had to think a lot about all of these things before I started putting the pencil to the paper. I wanted to make sure I had somewhat of an idea how the whole system would work together. First I put my goals for this project in writing.

What Are My Goals?

  1. To learn what links and parts of my website perform the best and optimize them to the max.
  2. To learn what links and parts of my site are under performing and optimize them to perform as best as they can.
  3. To increase the CTR on all of my affiliate links.
  4. To find out what brands, models, categories, and features are the most popular, and then optimize my site by focusing more on the popular items and less on the unpopular ones. Once I know what types of products are the most popular, I can add more content and reviews for those types.
  5. To increase my site revenue as much as possible.
  6. To optimize my entire website based off hard data rather than guesswork.

Then I decided on what I will be tracking and wrote that down too.

What Will I Be Tracking?

  • CTR of all Amazon Associate links – this will let me know what links are driving the most traffic to Amazon and what ones are duds.
  • CTR of different models I review on the archive and category pages – this will help me determine what the most popular products are on my site.
  • All interaction with my buyers guide – this is where I’ll be able to gather a lot of data about what brands, models, and features people are the most interested in, along with determining how well my custom buyer’s guide really works.
  • What models, brands, and features are the most and least popular – this will help me to optimize my site with the most popular items, and push the least popular ones to the back.

How Will I Implement My Tracking System?

  • Using Google Analytics Event Tracking with the Google Tag Manager.
  • Adding custom php code to my theme template to pass on additional data to Google Analytics through the event labels.
  • Using Google Analytics & Google Docs to track my data.

So after I got all of that figured out and written down, it was time to start implementing it. I started by mapping out the page layouts for all my different pages with Amazon links on them, and my buyer’s guide.

Mapping Out the Areas on My Niche Site Where I Want To Track CTR

I decided that it would be best for me to visualize my website in it’s simplest form, just a wireframe. This proved to be essential in figuring out my tracking system. By seeing all of the pieces laid out before me, I could easily visualize what I needed my tracking system to track. This part was essential to developing my tracking system.

First I sketched out all 7 page layouts that I use for my website, and then recreated them in Photoshop. Here are 2 of the page layouts that I use in my Amazon affiliate niche site. The other 5 are just like these but with a lot less on them, just a few spots I put affiliate links.

how to track ctr on affiliate links

I’m going to recreate these as 8 1/2″ by 11″ PDFs so I can print a few out and scribble all over them with data after I collect some. I still like good ole’ pencil and paper.

So … now that I have all of my pages mapped out, I can use this to write out my tracking document that has all of the things I want to track along with what additional data I wanted to pass back to Google Analytics. This is going to be my entire organizational schema.

Writing a Shorthand Code to Relay as Much Data as Possible Back To Google Analytics

When using Events in Google Analytics, you can pass an event label. I will be using php and html to add a shortcode to each event I track. The code will be added to my WordPress templates. I’ll be doing this so I can pass a whole bunch of additional data back to Google Analytics, data that the Analytics program could not tell me on it’s own. This is one of the secrets that I’m using to gain a competitive edge. Not only will I be tracking what links get clicked, but exactly where they were on the site and what the product names and specs were.

Here is the data I set up to pass along in the event label.

  • The page the link is on
  • The area of the page the link is on
  • The name of the product
  • Any other layout information or product information that is relevant to improving my site

I created short codes like this

hp-tm-m2:model name

~ which translates to ~

home page – top models – model #2 : product name

Now when an event gets passed to my Analytics, it will have hp-tm-m2:model name as the event label so when I’m looking at it in Google Analytics, I’ll have all of that extra info right there and it will allow me to make much deeper conclusions.

Mapping It All Out

My next task was to map out every link and code that I would be using so I could see the whole system as a whole. This enabled me to figure out all of the details and create all my short codes. After I got it all mapped out I was then able to tweak it and easily visualize the entire tracking system that I had just created.

THIS STEP WAS ESSENTIAL. I can’t even imagine how tricky it would have been to implement if I didn’t plan it all first.

In the end I created 42 different tracking codes. Here’s a few examples that I use. 

All Homepage Affiliate Clicks af-hp
All Homepage Bspot Clicks af-hp-bs
All Homepage Sticky Sidebar Clicks af-hp-ssb
All Buyers Guide Affiliate Link Clicks af-bg
All Single Blog Posts Sticky Sidebar Clicks af-sp-ssb

Then in the label that gets recorded with an event, I would pass the proper code along with the product name or other info. The codes will be added in a special tag in my html, and Google Analytics will pull the code from that tag.

It all might sound a bit confusing, especially if you’re not familiar with what Google Analytics event tracking is, but in the next part I’ll be showing you how I set up the special tags on my website, and how I set up the event tracking in the Google Tag Manager.

Table of Contents

2 comments on “Part 1: Developing a Custom CTR Tracking System for My Niche Website

  1. Steve Wyman on

    Hi Dave

    Did you ever continue this blog post with more info. I thought it was outstanding. Would like to learn more


    • Dave on

      Hi Steve,

      I haven’t written a follow up yet to that article, I ended up getting really busy with other objectives and I didn’t get an overall great response on that post so I let it go … for now.

      The problem with that whole topic is that what I set up on my own site, can’t be easily replicated by those who cannot work with code and editing WordPress theme files. It gets a bit advanced.

      However … I am building the tracking functionality into the Amazon theme that I’m developing right now, so that people who use my theme can utilize my system without having to touch code. It will all be done automatically on the WP theme side of things, just leaving the user to set up the Google Tag Manager side of the tracking system. I’ll be continuing the tutorial after my theme is launched to help people set up the GTM side of it, which can be a bit tricky in itself. After I have it built into my theme though, I will be able to give exact detailed instructions on how to set up GTM to use the built in tracking system in the theme.

      It will enable tracking of:

      • all amazon link clicks
        • what link was clicked
        • what page it was on
        • where ion the page it was
      • all other external clicks
      • all other internal clicks
      • all clicks on the custom buyer’s guide
        • what sorting controls are clicked the most
        • what features are selected the most

      And once it’s set up, you can view all of the link tracking right in Google Analytics, incorporate them with all of the other analytics, figure out CTR, etc. Very powerful stuff.

      If you’re in the camp of hiding your sites from Google Analytics, you’re out of luck though!

      That will actually be one of the big benefits of my theme, detailed tracking of all link clicks on a site using my theme.

      Just keep tabs on me, get on my list if you want a chance at beta testing the theme for me, and I’ll see you around!


Leave a Reply

Your email address will not be published. Required fields are marked *