Welcome to WebmasterWorld Guest from 54.162.91.86

Forum Moderators: buckworks & eWhisper & skibum

Message Too Old, No Replies

Tracking Event as Conversion using onclick function Tracking

Event tracking using onclick feature

     
11:45 pm on Jan 19, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 7, 2005
posts:790
votes: 0


Hi everyone,

I am trying to get analytics to track a click on a button as an event so I can create goals and import these into AdWords.

The current code for the button is;

<a class="button" href="javascript:void(0)" onclick="javascript:window.open(getDetailUrl(),'popup','resizable=1,scrollbars=1,status=no,left=50,top=50,width=550,height=350');">Show</a>

I have the following bit of code which I have to something with, but I'm just not sure what it is....

<a href="#" onClick="_gaq.push(['_trackEvent', 'PopupDetails', 'Click']);">View Contact</a>

Does anyone know how I am meant to get this working correctly or do you need any more info from me to be able to help?

Any help is appreciated. I'm not good with coding as you might know :-)
2:36 am on Jan 20, 2012 (gmt 0)

New User

10+ Year Member

joined:Jan 19, 2006
posts: 9
votes: 0


Hi briggidere,

I had a similar question as well. Saved this link. You can give it a try. Hope it helps
[answers.yahoo.com...]
8:00 pm on Feb 20, 2012 (gmt 0)

New User

10+ Year Member

joined:May 29, 2004
posts: 21
votes: 0


Try this:

<a class="button" href="javascript:void(0)" onclick="javascript:window.open(getDetailUrl(),'popup','resizable=1,scrollbars=1,status=no,left=50,top=50,width=550,height=350'); _gaq.push(['_trackEvent', 'PopupDetails', 'Click']);">Show</a>