Jump to content
Housy

[SOLVED] Google Analytics code should be in the <head> section!

Recommended Posts

Hello,

I'm using Prestashop 1.3.5 and i noticed that if i add google analytics code through built-in module, it doesn't work properly, becuase module adds code into body section (into footer, if i'm being more precise), instead of the head section.

How to fix it? If i add this manually it doesn't work.

Cheers

Share this post


Link to post
Share on other sites

If i add Google analytics code just before </head> tag, i get server error (500).

Why is that?

Even if i transplant Google Analytics module into Header, it doesn't work, nothing happens, the code is missing when i look for the source code in the browser.

I just hope, this guy in THIS THREAD will fix the problem, cause i'm not that smart =/

Thanks

Share this post


Link to post
Share on other sites

Google Analytics doesn't go in the header, it must go before the closing </BODY> tag. The reason is that google analytics watches every page that is created and provides stats on every page that is being accessed.

I suggest you take a look at setting up goals within your shop so that you can track each customer that comes to your site.

Cheers
T :)

Share this post


Link to post
Share on other sites
Google Analytics doesn't go in the header, it must go before the closing </BODY> tag. The reason is that google analytics watches every page that is created and provides stats on every page that is being accessed.

I suggest you take a look at setting up goals within your shop so that you can track each customer that comes to your site.

Cheers
T :)


Well, I didn't use goals, i just pasted the analytics code right before </body> and now i get good results =)

I'll also read more about goals =)

Thanks ;)

Share this post


Link to post
Share on other sites

I think Google changed it's mind, and now it wants to add the code in the header. By other side, the code changed. So, module should be updated.

Now i'm facing the same problem than Housy: i cannot position the module in the Head of Pages. It just wont show up.

Share this post


Link to post
Share on other sites

Where can I find detailed instruction on how to insert the new Google Analytics code? What file does it go to and do I need to uninstall the old Google Analytics Module 1.2? I am using PS 1.3. The old code is causing error messages during checkout.

Thank you.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×