Moving Tracking Code to Footer Causes Huge Spike in Bounce Rate
-
Hi there,
I use Google Analytics Dashboard to inject my tracking code. There is an option to move the tracking code to the footer:
add_action('init', 'gadwp_remove_trackingcode'); function gadwp_remove_trackingcode(){ if (class_exists('GADWP_Manager')){ $gadwp = GADWP(); if (isset($gadwp->tracking)){ remove_action('wp_head', array($gadwp->tracking,'tracking_code'), 99); add_action('wp_footer', array($gadwp->tracking,'tracking_code')); } } }
After inserting this snippet, there was a huge spike in my bounce rate. Removing it returned things to normal. I suspect the problem is because this plugin adds its tracking code to the head as well.
Would it be possible to introduce an option to move this plugin’s tracking code to the footer? (NB: I already load the script in the footer.) Perhaps a code snippet such as the one above — I imagine that this request doesn’t apply to most users of this plugin, so I can understand if you don’t want to add an option to the settings page in case it confuses people…
Thanks in advance for considering this!
- The topic ‘Moving Tracking Code to Footer Causes Huge Spike in Bounce Rate’ is closed to new replies.