Support » Plugins and Hacks » [Resolved] Add google analytics even tracking?

[Resolved] Add google analytics even tracking?

  • Is it possible to add the google code for event tracking
    typically you just add something like this into the <a href="url.com">

    onClick="_gaq.push(['_trackEvent', '', '',,, false]);"

    I tried doing that in random-post-link.php but got a syntax error

    any suggestions?



    [Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]

Viewing 1 replies (of 1 total)
  • You’d have to replace line 14 with something like this:

    printf('<a href="%s" onClick="_gaq.push([\'_trackEvent\', ... ]);">%s</a>', get_random_post_url(), $text);

    (Notice the backslashes before each apostrophe in your code.)

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Add google analytics even tracking?’ is closed to new replies.