Skip to content

Instantly share code, notes, and snippets.

@reinpk
Created March 21, 2012 04:58
Show Gist options
  • Save reinpk/2144542 to your computer and use it in GitHub Desktop.
Save reinpk/2144542 to your computer and use it in GitHub Desktop.
Facebook Like Event
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({appId: '193060914138470', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('edge.create', function(href, widget) {
seg.track('Liked on Facebook');
});
};
(function() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment