[SOLVED] Google Analytics code should be in the <head> section! - Free Modules & Themes - PrestaShop

Jump to content

Photo

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

#1

Posted 17 January 2011 - 12:18 PM

Housy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 210 Active 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

#2

Posted 17 January 2011 - 12:28 PM

Housy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 210 Active Posts
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

#3

Posted 17 January 2011 - 04:46 PM

abilas

    PrestaShop Apprentice

  • Members
  • PipPip
  • 26 Active Posts
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 :)

#4

Posted 18 January 2011 - 08:38 PM

Housy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 210 Active Posts

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 ;)

#5

Posted 18 January 2011 - 09:26 PM

abilas

    PrestaShop Apprentice

  • Members
  • PipPip
  • 26 Active Posts
[SOLVED] Glad this information helped, google analytics is a powerful tool to help filter down what is being looked at.

Good luck with your shop.

#6

Posted 18 January 2011 - 09:26 PM

abilas

    PrestaShop Apprentice

  • Members
  • PipPip
  • 26 Active Posts
Will you also change the subject line to read [SOLVED] etc... so users are informed that this has been resolved.

Thanks

#7

Posted 18 January 2011 - 09:37 PM

Housy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 210 Active Posts
I did =)

Thanks again ;)

#8

Posted 12 February 2011 - 03:25 PM

easyweb

    PrestaShop Newbie

  • Members
  • Pip
  • 10 Active Posts
Sorry for the noob question...but how do I add the google analytics code to my website?
In which file is the body tag located?

#9

Posted 23 February 2011 - 03:07 PM

mayid

    PrestaShop Apprentice

  • Members
  • PipPip
  • 39 Active Posts
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.

#10
inveostore.com

Posted 23 February 2011 - 06:23 PM

inveostore.com

    PrestaShop Apprentice

  • Banned
  • PipPip
  • 176 Active Posts
Moving GA code to the head section can make your site slow when Google servers are busy. This is the reason why it is recommended (and PS does do) to place GA code to footer.

#11

Posted 27 August 2011 - 04:09 AM

aliaspt

    PrestaShop Apprentice

  • Members
  • PipPip
  • 241 Active Posts
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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cookies help us deliver our services. By using our services, you agree to use our cookies.     Learn more