Skip to content

Instantly share code, notes, and snippets.

@reinpk
Created March 21, 2012 05:01
Show Gist options
  • Save reinpk/2144550 to your computer and use it in GitHub Desktop.
Save reinpk/2144550 to your computer and use it in GitHub Desktop.
Twitter Tweet event
<script type="text/javascript">
window.twttr = (function (d,s,id) {
var t, js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return; js=d.createElement(s); js.id=id;
js.src="//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs);
return window.twttr || (t = { _e: [], ready: function(f){ t._e.push(f) } });
}(document, "script", "twitter-wjs"));
twttr.ready(function (twttr) {
twttr.events.bind('tweet', function () {
seg.track('Tweeted');
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment