Google Tag Code is Not Displaying On Every Page - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Google Tag Code is Not Displaying On Every Page

SC

Sean Carney

Template 2 years ago

I have added Google tag code to my Gazette template but am not able to see the code appearing on any pages. I am wondering if this is a problem with the template of if it might actually be caused by our use of JCH Optimize to optimization. However, I did turn off the JCH Optimization and cleared all the cache files and still was not able to see that Javascript.

Since we are not using the Cloudflare CDN we need to look at this at the Alternative URL of the Origin server.

0
5 Answers
SC
Sean Carney
Accepted Answer
2 years ago #108433

We solved this issue by

  1. listing the google js scripts in the exclude field for JCH Optimize to not defer those scripts to the bottom of the page.

  2. Removing the scripts from the template and only having them in 4SEO.

Thank you for pointing me in the right direction.

Sean

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #108159

Hi Sean,

let me think & check.

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #108162

Ok, found.

I checked few subpages and JS Tag code is used, but becuase you have 4SEO component it's used also on the top. Example that same subpage, google tag code is used 2x:

info_633_2023.jpg

info_634_2023.jpg

  • 1-st from 4SEO
  • 2-nd from Template Custom Code area

I think it's an answer to your question.

0
SC
Sean Carney
Accepted Answer
2 years ago #108249

Thank you very much. I sure appreciate your help. I think I will remove it from your template then and let 4SEO handle it since I want to use 4SEO for other purposes as well.

I do have one more question. I am thinking that you might have had to change my JCH Optimize setting to the Premium setting instead of the Optimum setting in order to turn off the option to Defer/Asynch Javascript?

also, I am wondering if you had to turn off the JCH Optimum page caching plugin in order to get the Google tag code to display?

I am asking mostly because I noticed some settings were changed. But, there is nothing more I need fro you to resolve this problem. You helped me enough already. :-)

Thanks, again

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 2 years ago #108447

About all JCH Optimize questions please ask directly their support, we cannot do they job.

0