-
-
Save odats/4946244 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="fb-root"></div> | |
<script> | |
(function() { | |
window.fbAsyncInit = function() { | |
FB.Event.subscribe('edge.create', function(response) { | |
_gaq.push(['_trackSocial', 'facebook', 'like', response]); | |
}); | |
FB.Event.subscribe('edge.remove', function(response) { | |
_gaq.push(['_trackSocial', 'facebook', 'unlike', response]); | |
}); | |
}; | |
var e = document.createElement('script'); e.async = true; | |
e.src = document.location.protocol + | |
'//connect.facebook.net/en_US/all.js#xfbml=1'; | |
document.getElementById('fb-root').appendChild(e); | |
}()); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
FB.ui({ | |
method: 'apprequests', | |
message: 'You should visit Mixcloud.' | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="fb-root"></div> | |
<script> | |
(function() { | |
window.fbAsyncInit = function() { | |
FB.Event.subscribe('message.send', function(response) { | |
_gaq.push(['_trackSocial', 'facebook', 'send', response]); | |
}); | |
}; | |
var e = document.createElement('script'); e.async = true; | |
e.src = document.location.protocol + | |
'//connect.facebook.net/en_US/all.js#xfbml=1'; | |
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
https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSocial?hl=no-NO#facebook
http://www.savio.no/blogg/a/106/tracking-facebook-likes-share-send-og-comments-as-social-engagement-in-google-analytics