Google Analytics - Advanced Tracking with JavaScript Events
Want to Learn How to Build a Business Not Just a Blog.. for FREE? CLICK HERE Now to Find Out How!
In 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
Part 7: Google Analytics - Creating Goals
Did You Download Your FREE Copy of "How to Build a Business NOT Just a Blog" Yet? Click Here Now to Get Your Copy!
32 Comments »
Trackback responses to this post
- Google Analytics - Content | John Cow dot Com
- Google Analytics - Outgoing Traffic | John Cow dot Com
- Google Analytics - Incoming Links | John Cow dot Com
- Google Analytics - Keywords and Covering the Basics | John Cow dot Com
- The Blue Planet
- Google Analytics - Creating Goals | John Cow dot Com
- John Cow dot Com - MyBlogLog
- Google Analytics & Social Marketing Go Hand in Hand | John Cow dot Com
- Goals in Google Analytics: Why Do They Matter?
- Your page is now on StumbleUpon!
- Butterfly Media Romania Blog - Marketing, SEO and WordPress


All New CommentMILK Version 1.0










I’m amazed how many things I can do with Analytics and I wasn’t even aware of the existence, before you came up with this amazing tutorials…
THANKS a lot !!!
ciao
alex
Big Bloggers last blog post..7 cool tips on how to increase your RSSfeed subscribers this summer on the beach
Excellent stuff!!! Bring able to track individual elemets within a page is such as good tip. This Google Analytics function is fantastic.
steves last blog post..Sell crafts? It’s time to make your own Christmas decorations!
Im learning more about analytics every day thanks to you John!
:)
The Dudes last blog post..Introducing… John Cow!
This gives me more idea about google analytics.im just starting learning it.tnx
NaldzGraphicss last blog post..350+ High Quality Web 2.0 Gradient Collection
Google Analytics is a very powerful tool. I never knew how to track my affiliate clicks before today… Thanks
iearnwhileisleeps last blog post..Interview With a Million Dollar Blogger
Thanks for sharing. This is good stuff and I am definitely learning here. Much appreciated.
I didn’t know I could do that with Analytics - Awesome! Thank You.
Google analytic sworks really well for any sort of blog. It gives you so much information and you can really understand what people are looking for and what they have liked on your blog. Once you understand what people like on your blog you can start making more of that sort of content to keep those readers and to even get more readers.
Wonderful! Tell me one thing. If i have download links like the ones on my website, can they too be tracked via Analytics?
they sure can, just add the code the the link for the download.
Great post thanks , i will be visit here more often
I’ve used Analytics for quite some time, but had no idea about some of this. Thank you so much.
I’ve used Google Analytics for some time now, combining them with my server stats to get a good picture of my sales-critical websites. But more and more I’m finding GA is giving me better detail - and with the information you’re supplying too, it’s turning into an essential sales tool. Look forward to more of your interesting ideas!
Ken
Never thought there’s so much you can really do with google analytics, cow! awesome! also, do add more articles similar to this.. like how you take advantage of other free tools available online.. good job!
ChiQ Montess last blog post..Reasons Why I Like Entrecard!
This is really good stuff. I hadn’t even realized that I could track links with GA. These tutorials are really helping me to understand all the stats I can pull out of GA. Looking forward to more of them.
This is really a great series on Analytics, I was going to do some similar posts, but I think I will just post a link to yours, thanks John!
JR
John,
I forgot to ask you, this is probably a stupid question, but this coding will work on blog html as well right? I am asking because recently I had read some coding guides and they did not display correctly in WP.
Thanks,
JR
JR’s Internet Marketing Strategiess last blog post..Google Knol - the Good, the Bad and Internet Marketing Benefits
It sure does…if you look at the source code of this page you will see it used in a few places.
Great information. So how do you create the jagged edges on all of your images in your posts?
Wow! I really think you can make a report with all this info and sell it for big money, thanks for give us access to all this stuff for FREE!
Hey John,
we’re at the end of your course, but I haven’t figured out how to see how many Adsense clicks each keyword brings me.
Would love to learn it.
Big Bloggers last blog post..7 cool tips on how to increase your RSSfeed subscribers this summer on the beach
This is an excellent lesson–I’ve ben using Analytics for a long time, but never knew I could track which outgoing links were clicked on. All very well explained and useful.