A Shopify store owner discovered visible code text appearing at the top and bottom of their website after installing Google Tag Manager. They wanted to keep the tag installed but hide the code from public view.
Root Cause Identified:
The Google Tag code was placed outside of proper script tags, causing it to render as visible text instead of executing as code.
Solution Provided:
Move the Google Tag code (specifically the gtag('config', 'AW-3344547...') line) inside proper script tags with the correct markup structure.
Outcome:
The issue was successfully resolved after implementing the suggested code placement fix. The store owner confirmed the solution worked.
Summarized with AI on November 19.
AI used: claude-sonnet-4-5-20250929.
I have code txt visible on my website and can not work out how to hide it from the public! I believe it happened when I installed google tag. I want to keep the google tag installed just not to show on my website.
See below photo’s of the top and bottom of my website showing the code displayed. Please help?!
Can you share the link to your website please? This would make it a little bit easier for me to see what the problem is and guide you in the right direction.