Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Okoth1

    (@okoth1)

    Hi Steven,

    I know what you mean, I also like as few plugins as possible.

    Brains’s code doesn’t work with Universal Analytics and Yoast has changed a small thing in the tracking code that also makes sure other people have to adjust their scripts. So, you can’t copy and paste Brain’s code into your footer.

    The advantage of a plugin is you get an update let’s say in case Yoast changes his plugin again.

    But it is possible to have a basic script to put in your footer without a plugin. Besides the time intervals, do you want to have any other functions or is it just time to fire events that you want? I can have a look at it.

    Thread Starter stevenhermans

    (@stevenhermans)

    I went with the plugin for now. Bounce rate is still too high (I used to have a version of Yoast with an extra line for the adjusted bounce rate which I had manually put into the code – I had BR of 10%, now around 40%).

    It should take effect immediately, right?

    I saw Yoast has the possibility to add a line of code, to be added before the _trackPageview call.

    Can I add this line to it there:
    setTimeout(“ga(‘send’,’event’,’NoBounce’,’over 10 seconds’)”,10000);

    or does it need to go after the trackpageview call?

    An extra line of code to track scrolls would be cool, but not necessary.

    Thanks so much for the help, very kind!

    Plugin Author Okoth1

    (@okoth1)

    You should try this

    setTimeout("__gaTracker('send','event','NoBounce','over 10 seconds')",10000);

    It might already be enough for what you want.

    It should go after the …send’, ‘pageview’); though

    Thread Starter stevenhermans

    (@stevenhermans)

    That’s what I thought. I am sticking with the plugin for now, it seems to be doing its job without being a big CPU hog, and BR is back to 6%.

    Thanks again!

    Plugin Author Okoth1

    (@okoth1)

    You can also add your line manually in your header if you put it just before the </head>

    Like this

    <script type="text/javascript">
    setTimeout("__gaTracker('send','event','NoBounce','over 10 seconds')",10000);
    </script>
    </head>

    Then you don’t need the plugin anymore.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Difference with original code by Brian Cray?’ is closed to new replies.