Skip to content

Instantly share code, notes, and snippets.

@plasticmind
Created November 19, 2014 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plasticmind/14e04ebfa734b13e720f to your computer and use it in GitHub Desktop.
Save plasticmind/14e04ebfa734b13e720f to your computer and use it in GitHub Desktop.
Adjusted Bounce Rate for Google Analytics
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX']);
_gaq.push(['_trackPageview']);
setTimeout("_gaq.push(['_trackEvent', '15_seconds', 'read'])",15000);
setTimeout("_gaq.push(['_trackEvent', '30_seconds', 'read'])",30000);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment