Support » Plugins » Facebook Like plugin with Google Analytics tracking

  • Hi,

    Does anyone know of a Facebook Like button plugin that would automatically add Google Analytics tracking code to the resulting link from Facebook? The ‘WP Tweet Button’ plugin has this functionality for Twitter. I’m currently using the ‘Facebook Like’ plugin.


Viewing 3 replies - 1 through 3 (of 3 total)
  • I havent found a plugin but this article shows you how to do it manually:

    Thanks, I’ve seen that article too. I would like to use that method, however, I’m not sure how to write the code to dynamically change the URL to be liked so that it changes for each post and always appends the tracking parameters. Do you know?

    not working yet, but think i’m geting close

    <fb:like action=’like’ onclick=”javascript: _gaq.push([‘_trackEvent’, ‘Likes’, ‘fb-like’, ‘<?php echo urlencode(get_permalink($post->ID));?>’])” colorscheme=’light’ href=”<?php echo urlencode(get_permalink($post->ID).’?utm_source=facebook&utm_medium=social&utm_campaign=like’); ?>”
    layout=’standard’ show_faces=’true’ width=’300’/>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Facebook Like plugin with Google Analytics tracking’ is closed to new replies.