Diễn Đàn SEO Panda - SEO Panda Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Diễn Đàn SEO Panda - SEO Panda Forum

Diễn Đàn SEO Panda Dành Cho Các SEOers Tự Do Thảo Luận SEO - SEO Panda Forum - Free SEO Forum to share your knowledge to the world
 
HomeLatest imagesSearchRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Top 10 SEO Tools ( fresh links )
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptyWed Feb 04, 2015 10:56 pm by tranvanchienhn

» Bán Textlink Pr4-Pr6 (1PR9)
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptyWed Feb 04, 2015 10:54 pm by tranvanchienhn

» Google’s Penguin Update: What it is, What it isn’t, and What to Do
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptyTue Apr 22, 2014 3:23 pm by johnaclayton

» Free Click Bank Affiliate Tool
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptyTue Apr 22, 2014 3:21 pm by johnaclayton

» SEO is Dead – Long Live SEO
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptyTue Apr 22, 2014 3:17 pm by johnaclayton

» Local SEO là gì - 10 Thủ thuật Local SEO
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptyWed Apr 02, 2014 3:31 pm by bao.seoinet

» Get High Rankings by Building Authoritative, Irrelevant links?
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptySat Sep 21, 2013 9:32 pm by kyostyle1

» The best Engineering software
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptySat Sep 14, 2013 2:12 pm by read2

» Tuxedos- Traditional Interest Trend
How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptyWed Sep 11, 2013 2:16 pm by taiiwin


 

 How to Count Your Outbound Click Stats with Onclick in Google Analytics

Go down 
AuthorMessage
khiemsound




Posts : 1016
Points : 25080
Join date : 2012-03-27

How to Count Your Outbound Click Stats with Onclick in Google Analytics Empty
PostSubject: How to Count Your Outbound Click Stats with Onclick in Google Analytics   How to Count Your Outbound Click Stats with Onclick in Google Analytics EmptySat Apr 21, 2012 8:49 pm

Updated May 2010

This is an old post referencing a version of this blog that no longer exists. No matter though – thanks to a number of requests I’ve added the actual code snippet (copy / paste) for outbound click tracking and added a section on using event tracking too. Scroll down to the bottom to get the code snippets or read on!
Counting Your Outbound Clicks with Onclick in GA

This evening I’ve set up my side bar “Find me on” links to track outbound clicks using a javascript onclick event. I’ve set this up mainly out of a curiousity to find out how much of my traffic exits via my WordPress sidebar, and of course an interest in how this type of outbound link tracking works!

My post builds on a great article (and plugin) from Joost De Valk. His article, Checking your outbound click stats is a fantastic run through of how to use the Google Analytics “content drilldown” report to work out where you’re sending traffic (providing you’re tracking the clicks). If you’ve correctly installed his plugin, your comments, downloads, comment author link, article links and blogroll link clicks are all tracked automatically. Those outbound clicks should look like this:



But what if, like me, you’ve created a bespoke sidebar, that isn’t quite dynamic enough to talk to a plugin like this? Basically, I’ve hard coded my sidebar links and I’d like to be able to track what exit clicks they’re generating.
Tracking your (hardcoded) sidebar link outbound clicks with a javascript onclick event

I’m going to use my “Find me on” links on the right hand side of this blog as the example. In short, I have worked through the HTML in this code and replaced the ordinary link anchor (


The first snippet of code is my Linkedin profile link. It’s an ordinary bit of code for an image that carries an outbound link in the HTML anchor.

Below is our next snippet. By using firebug in inspect mode, I grabbed the default onclick code from an outbound link from one of my recent articles and carefully replaced the href= url to the one I want to track. You will notice (If you look at an onclick in another article post on this blog) that I have changed the code “/outbound/article/” to “/outbound/sidebar”. This change will separate out click data coming from my sidebar – and will appear neatly in the content drilldown report above.



Finally, I need to update the first code snippet with this new onlick event. All that needs to be done here is replace the old HTML anchor link with this entire line of code:


Here’s the copy / paste code snippet:


Click tracking with Events in Google Analytics

Event tracking was actually meant for tracking where a pageload may not occur, but it’s useful for nearly anything where an action occurs on the site. It makes for a pretty handy way to track any kind of click though – largely thanks to Google analytics categorisation system for types of event. Here, in the event tracking section for Google Analytics you can see categories, actions and labels.



Events are categorised and assigned actions and labels in the JavaScript. This simple example shows event tracking in action on a “post to Facebook” action:



The category in this example is “events”, the action, “exit click” and the label “SEOgadget”.

Categorisation in event tracking is enormously powerful as soon as you get a good handle on it – for more information check out this resource over at Google code.
Back to top Go down
 
How to Count Your Outbound Click Stats with Onclick in Google Analytics
Back to top 
Page 1 of 1
 Similar topics
-
» Outbound Links in Blog Articles Increase Engagement Metrics
» Playing Around With Google Webmaster Tools Click Data
» Playing Around With Google Webmaster Tools Click Data
» Free Click Bank Affiliate Tool
»  Google sẽ cho "nghỉ hưu" Google Health, Google PowerMeter

Permissions in this forum:You cannot reply to topics in this forum
Diễn Đàn SEO Panda - SEO Panda Forum :: Search Engine Optimization :: Black Hat SEO-
Jump to: