Tagged: x
-
AuthorPosts
-
May 28, 2016 at 12:09 pm #1014483
SamsungKLParticipantI use the Google Analytics plugin that comes with X Theme, but it’s giving me a bounce rate of 2% which is obviously not correct.
So I’m wondering, where else could I put this code so that it gives me a correct bounce rate?
May 28, 2016 at 7:49 pm #1014806
RadModeratorHi there,
Thanks for writing in.
According to Google Analytics https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingOverview#partTwo
Where to Place the Tracking Code
The tracking code is designed to read data from your page after the content for the page has finished loading. For this reason, the snippet should be located just before the closing </body> tag for your web page. Once the content for your page has loaded, the tracking code, when executed, reads the content for your page following the Document Object Model (DOM). All information relevant to tracking is then used to establish page information, set/update cookies, and to send the GIF request to the Google Analytics servers.
By placing the script at the end of the page body, you ensure that the tracking code is executed as the last element of the DOM. If a given page load is interrupted for some reason, it is possible that the GIF request for that page view will not be executed. However, should you place the tracking code at the top of the page, any load interruptions might result in incomplete or inaccurate reporting anyhow, since the tracking code relies on page data for its reports.
Additionally, the physical placement of the tracking code call at the bottom of the page is more effective than using an onLoad() function to call the tracking code. If you use onLoad() to execute the tracking code, execution relies on the event model for the browser instead of the DOM. In such a situation, should a remote image fail to load on a page, onLoad() will not be called, whereas the DOM for the page could still load completely.
Our google analytics extension place the embed code on proper location. But, you can always change its position through the extensions option Position.
Though, I still can’t answer about the bounce rate. You could try other 3rd party plugins that offer advanced analytics. But regardless of the plugin, there is only two location where it can be placed, it’s head (
<head></head>) and footer (before</body>).Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1014483 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
