Skip to content

Instantly share code, notes, and snippets.

@boffey
Last active December 11, 2015 22:49
Show Gist options
  • Save boffey/4672244 to your computer and use it in GitHub Desktop.
Save boffey/4672244 to your computer and use it in GitHub Desktop.
Google + Tracking
// Change googlePlusShare to your function name
<div class="g-plusone" data-callback="googlePlusShare"></div>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
window.___gcfg = {lang: 'en-GB'};
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<script>
function googlePlusShare() {
// Track Google
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment