Google Analytics in <head> not <body>

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hello,

I am using nopCommerce 3.4 and the Google Analytics plugin 1.15. The plugin places the code just above the </body> tag. Our SEO guy wants the code just above the </head> tag.

How would I go about this?

Cheers,
Rhek
9 years ago
rhek wrote:
Hello,

I am using nopCommerce 3.4 and the Google Analytics plugin 1.15. The plugin places the code just above the </body> tag. Our SEO guy wants the code just above the </head> tag.

How would I go about this?

Cheers,
Rhek


Hello Rhek,

Google recommends the Google Analytics code right before the </body>

For more information see this: https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingOverview


But, if you would still like to change the location, here are the steps:

http://www.strivingprogrammers.com/Blog/post/Lavish-Kumar/1064/How-to-place-Google-Analytics-script-in-head-instead-of-body-in-nopCommerce/
9 years ago
Thanks for the reply and links!

Rhek
9 years ago
That is not true. For the new Universal Analytics it is recommended to place the code immediately before the </head> tag. See the latest help documentation: https://support.google.com/analytics/answer/1008080
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.