Google Analytics - Advanced Tracking with JavaScript Events
July 28th, 2008 by John CowIn the previous post I talked about “Google Analytics - Content” and how you can use the information to understand what are popular topics on your site to create content about. Today I want to talk about another “Content” feature in Analytics but this one is a little bit of a different tactic.
Google Analytics offers the ability to create what is called “Java Script events” that are added to the html of a link on your blog. These events will treat the link like it is an actual page and by doing this you will be able to see specific details about the links that are very worthwhile to know.
There are dozens of different things you can use this strategy to track and when you tie it in with setting up goals (I talk about this tomorrow) you have an extremely powerful “one - two” punch that gives you very powerful data.
Some examples of things you can track using this strategy…
- If you have a page with multiple call to actions that link to the same page, you can track which one is getting the most action.
- If you want to track clicks on different banner ads on your site, you can know specifically which banners are getting the most clicks.
- If you want to track the amount of times someone downloads a PDF, ZIP or some other file.
- If you run PPC and you have multiple copies of the same page for specific keywords and you are promoting the same affiliate product, you can track which specific page is getting the best CTR (Click Through Rate) on the actual “Call to Action” link. This is very powerful since most affiliate products do not allow you to put conversion tracking on their thank-you page… hmmm I see another series of posts here for tracking PPC.
- and the list can go on and on…
To create an event you simple add the following code to your link…
onClick=”javascript: pageTracker._trackPageview(’/event/nameofevent’);
So the html of your link would appear like…
<a href=”http://www.domain.com/pagename” onClick=”javascript: pageTracker._trackPageview(’/event/nameofevent’);”>
the (’/event/nameofevent’) is what Analytics will use to identify the specific link. So for example, say I have a pre sales page that I want to track which call to action link on that page is getting the most amount of “Action” to the product I was promoting at abc.com, I would put with the top link in the post…
(’/aff_event/top_abc.com’)
…and with the second link you could put…
(’/aff_event/bottom_abc.com’)
…and if I had a banner ad in the post to the same product, I would put…
(’/aff_event/image_abc.com’)
This is effective for testing links in different parts of your page and also using different call to actions or images.
Another example of how you could use a Java Script event is if we were giving away a free download. For that I would use…
(’/downloadevent/pagefilename_pdf’)
If the file name is too long then just use abbreviations.
These are just two simple examples of how to use Java Script events and again when you tie them in with goals, it is very worthwhile.
How to Track the Events
Step 1: In the sidebar navigation menu, click on “Content” and then “Content Drilldown”

Step 2: Make sure to select “500″ in the display drop down and you will see all the content that Analytics has tracked being visited. Scroll down and click on /event/ (or what ever you called the first part of your file name in your event)
Note: you can name this what ever you want in the code.
Step 3: You will now get a list of all the javascript events you have created on your blog and you can start to see what links visitors are actually clicking on.
Purpose: I realize I reviewed different strategies already but for a lot of you who are just getting started and are primarily promoting other affiliate programs and this strategy is very effective for helping to understand whether a specific affiliate product is converting well or not. What you can do is add the javascript event to your links and if you see you are sending a lot of traffic to the affiliate site but not making sales, then you would want to test different affiliate offers, since you are sending lots of traffic but the sales page itself they are landing on is not converting.
If however you notice that you are sending very little traffic (getting a small amount of clicks on the affiliate links) you would want to focus on getting more visitors on your page and test a stronger “call to action”.
Often times we want to blame the affiliate program for not selling well but we are to blame because we are not even sending traffic to them… or we think we suck at affiliate marketing because we can not make sales when it is the actual affiliate product that is doing a poor job of converting sales.
Whew I hope that makes sense
So, any ideas pop up on how you can use this strategy?
Part 1: Google Analytics - Installing
Part 2: Google Analytics - Keywords
Part 3: Google Analytics - Incoming Links
Part 4: Google Analytics - Outgoing Traffic
Part 5: Google Analytics - Content
Part 6: Google Analytics - Tracking with JavaScript Events
Click Here Now to Download “How to Build a Business Not Just a Blog” for FREE and Learn the Right Way to Make Money Online! - Copyright JohnCow.com - All Rights Reserved
Posted in Uncategorized |
