Allow us to put trackEvent scripts in Google Analytics / Multisite Analytics

This is perfect for blogs. Say you have a long post, someone reads it. Then leaves. Google considers that a Bounce.

Theres the article. Essentially, you need to push an event to google, in this case its “read” – so they can avoid a bounce rate. Obviously, people can set whatever timer they want. However, this should work for most.

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-1']);
setTimeout("_gaq.push(['_trackEvent', '15_seconds', 'read'])",15000);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


So you could simply allow us to insert any line of text as part of the settings, or you can get fancy and build the trackEvent and allow a field for the event name, and the time. etc…

But all that has to be added to the code to limit bounces would be this:

setTimeout("_gaq.push(['_trackEvent', '15_seconds', 'read'])",15000);