GA Event Tracking

Discussion in 'Google Analytics' started by Tarheel, Dec 1, 2014.

  1. #1
    This is the code I input into my website for an email link click:

    <a href="mailto:" onclick="_gaq.push(['_trackEvent', 'Email', 'Click', 'Email Link Click',, false]);"></a>

    It has not tracked anything yet....does the code look incorrect?

    I went to my GA dashboard and checked under Behavior > Events and it does not display any events.
     
    Tarheel, Dec 1, 2014 IP
  2. O-D-T

    O-D-T Member

    Messages:
    180
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #2
    O-D-T, Dec 1, 2014 IP
  3. Tarheel

    Tarheel Member

    Messages:
    92
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    33
    #3
    Yea that is the page I used to figure it out. I changed it to this:

    email: <a href="mailto:" onClick="_gaq.push(['_trackEvent', 'Email', 'Click',]);"></a>

    The other parameters were optional so I am assuming this will work.
     
    Tarheel, Dec 1, 2014 IP
  4. kingofthewiki

    kingofthewiki Greenhorn

    Messages:
    95
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    23
    #4
    I wrote this a few months ago. I think this is really helpful for anyone trying to get into event tracking. Could be tricky depending what version of code you are using.

    http://stackoverflow.com/questions/21333665/google-analytics-event-tracking-code/21466522#21466522
     
    kingofthewiki, Dec 21, 2014 IP