Skip to content

Instantly share code, notes, and snippets.

@guillaumew
Last active December 19, 2015 21:28
Show Gist options
  • Save guillaumew/6020074 to your computer and use it in GitHub Desktop.
Save guillaumew/6020074 to your computer and use it in GitHub Desktop.
Track Linked In shares in Javascript
<!-- Importing Linked In Library -->
<script src="//platform.linkedin.com/in.js" type="text/javascript">
lang: en_US
</script>
<!-- Add Javascript Callback function -->
<script>
function callback(){
alert("ok"); // Change to real code
}
</script>
<!-- Insert LinkedIn share button with callback attribute -->
<script type="IN/Share" data-counter="top" data-onsuccess="callback" ></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment