WordPress.org

Ready to get started?Download WordPress

Forums

Social Media Widget
Using Google Analytics Event Code (2 posts)

  1. ontargetpro
    Member
    Posted 2 years ago #

    Love the plugin. In fact I use it twice on my blogs - one for social sites, one for review sites.

    I'm trying to get better about tracking goals and events with Google Analytics. Is there a way to incorporate event tracking code here?

    This is what my event tracking link looks like for keeping track of those clicking to subscribe to my Email newsletter:

    <a href="http://bit.ly/KsCL78" onClick="_gaq.push(['_trackEvent', 'Email Signup', 'Email Signup Click', 'Clicked', 50, true]);">Get our Email Newsletters.</a>

    Might be asking too much, but figured I'd try!

    http://wordpress.org/extend/plugins/social-media-widget/

  2. brianfreytag
    Member
    Posted 2 years ago #

    This actually isn't a terrible idea, but I'm not sure how I might include this is my widget. The obvious thought is to include an "onClick" event input box, but I can foresee this being used for evil instead of good (security issues).

    I'll think on this issue and read into security issues that might arise by allowing onClick javascripts in my widget.

    Thanks for the suggestion,

    Brian

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic