Jump to content

How do I add google tag manager code in version 1.7.5.1 ?


Harvy Gangyan

Recommended Posts

I am using Prestashop version 1.7.5.1 and trying to add google tag manager code so I can enable tracking.

I followed instructions from one of the forum topics (from this forum only) but after I added the codes, my website crashed and it gave me "HTTP ERROR 500". Once I restored the original file, my website worked fine again.

Here are the steps I followed:

1. I edited the file /var/www/html/themes/MY_THEME/templates/layouts/layout-both-columns.tpl

2. I added Head Section Code under "<Head>" tag

3. I added Body Section code after  <body id="{$page.page_name}" class="{$page.body_classes|classnames}"> 

 

Once I do this, the website starts throwing HTTP Error 500 on me. Can someone help me with this issue and suggest me a solution please?

 

Thanks in advance.

  

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Hello!
I am having the same problem, i added the script code to the head in layout-both-columns.tpl with {literal} tags and the noscript right under the body id="{$page.page_name}" class="{$page.body_classes|classnames}"> without {literal} tags

Google tag manager just doesn't seem to read it.

Does anyone know the solution to this?

Link to comment
Share on other sites

2 hours ago, ottowebs said:

Google tag manager just doesn't seem to read it.

I think the isssue lies with Google. Some pages the verification is there and visible but the detection of Google fails for weeks now. They have issues which you see when your pages need to be verified again. That usually is a reset. Solution could be to contact Google via Twitter, now X. 

Link to comment
Share on other sites

19 minutes ago, Nickz said:

I think the isssue lies with Google. Some pages the verification is there and visible but the detection of Google fails for weeks now. They have issues which you see when your pages need to be verified again. That usually is a reset. Solution could be to contact Google via Twitter, now X. 

Thank you, the problem is: "Google Tag not Found". Do you think the there might be an issue with cookies?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...