Advanced Responsive Video Embedder
[resolved] Google analytics tracking (2 posts)

  1. sumoboy
    Posted 3 years ago #

    How can I get some onclick code embedded into the link to support Google analytics?

    onClick=”_gaq.push(['_trackEvent', 'youtube', 'view', 'my awesome video', '1', true]);”


  2. Nico
    Plugin Author

    Posted 3 years ago #

    Only the thumbnails have links and all have a wrapper class, you could target them with jQuery with

    $('.arve-embed-wrap .a').click( function(){
       //do your stuff here

    Thumbnails also have a id you can work with.

    There is no way to hardcode this into the links with my plugin, maybe with wordpress content filters i don't know ...

    There might also other solution for this, i have no really idea of google analytics and this is more a general question, not really about my plugin. So please ask this in a general forum or on http://stackoverflow.com/.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic