WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. sumoboy
    Member
    Posted 1 year 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]);”

    http://wordpress.org/extend/plugins/advanced-responsive-video-embedder/

  2. Nico
    Member
    Plugin Author

    Posted 1 year 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