Skip to content

Instantly share code, notes, and snippets.

@ptasker
Created November 28, 2012 16:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptasker/4162223 to your computer and use it in GitHub Desktop.
Save ptasker/4162223 to your computer and use it in GitHub Desktop.
GA Track Social
FB.Event.subscribe('edge.create', function(targetUrl) {
_gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);
});
FB.Event.subscribe('edge.remove', function(targetUrl) {
_gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]);
});
FB.Event.subscribe('message.send', function(targetUrl) {
_gaq.push(['_trackSocial', 'facebook', 'send', targetUrl]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment