• Resolved newgamer

    (@newgamer)


    <script type="text/javascript">
     var _gaq = _gaq || [];
     _gaq.push(['_setAccount', 'UA-XXXXXXX-1']);
     _gaq.push(['_trackPageview']);
    setTimeout("_gaq.push(['_trackEvent', '10_seconds', 'read'])",10000);  // --additional line
     (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>

    I’m trying to add the trackEvent into the wp plugin but I can’t seem to find the right location to put the single line of code.

    https://wordpress.org/plugins/google-analytics-dashboard-for-wp/

Viewing 1 replies (of 1 total)
  • First thing, that code is from Classic Analytics which is officially deprecated now. You should switch to Universal Analytics as soon as possible.

    To add a line in the existing code, you can use this hook: ga_dash_addtrackingcode

Viewing 1 replies (of 1 total)

The topic ‘Adding Adjusted Bounce Rate’ is closed to new replies.