Welcome to WebmasterWorld Guest from

Forum Moderators: DixonJones & mademetop

Message Too Old, No Replies

Event tracking with Google analytics

How to setup?


easy company80

6:28 am on Jun 25, 2010 (gmt 0)

5+ Year Member

I want to setup event tracking with analytics on a blog post on a site running wordpress. My objective is to see exactly how many views that post gets and how many clicks on the image accompanying the post.

I am reading through Google's guide to this and they gave an example for the script to insert for tracking the plays of a video:

<a href="#" onClick="_gaq.push(['_trackEvent', 'Videos', 'Play', 'Baby\'s First Birthday']);">Play</a>

So for my custom event if I were to change 'Video' (the category name) to 'blog post' and 'PLay' (action name" to 'clicks' would that work?

Also where exactly on the site would I insert this code?

easy company80

4:21 am on Jun 26, 2010 (gmt 0)

5+ Year Member

No one know how to do this? I've tried the google help but I'm still pretty clueless :(


10:24 am on Jul 13, 2010 (gmt 0)

5+ Year Member

It should work when changing the names in the code.

The amount of views of the blogpost would be better handled by the normal (trackpages) action of analytics, the clicks on the image could be done with the above mentioned code.

Just put the onclick="...." in the <img> tag

Featured Threads

Hot Threads This Week

Hot Threads This Month