Code visible on website

Solved
Jode81
Tourist
12 0 2

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?!

top of website.jpg

bottom of website.jpg

Accepted Solution (1)
RajatWeb
Shopify Partner
197 46 62

This is an accepted solution.

Hi @Jode81 
I found the reason this is because Google Tag is outside the script tag in code.

Current --> 

 <!-- Google tag (gtag.js) -->
 gtag('config', 'AW-11033445427');

 

Change this to 

<script>
 <!-- Google tag (gtag.js) -->
 gtag('config', 'AW-11033445427');
</script>

 

This will solve the issue.


 

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: rajatsharma.web@gmail.com
Skype: rajatsharma.web

View solution in original post

Replies 6 (6)
RajatWeb
Shopify Partner
197 46 62

Hi @Jode81 ,

 

This happen if there is issue in rendering of page so code is not properly rendered, could you please share your store url so I can check.

Thanks

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: rajatsharma.web@gmail.com
Skype: rajatsharma.web
Jode81
Tourist
12 0 2

Thankyou, it is www.onestopcelebrations.com

Zqdo
Shopify Partner
803 32 60

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. 

Jode81
Tourist
12 0 2

My website is http://www.onestopcelebrations.com/

 

Thankyou 🙂

RajatWeb
Shopify Partner
197 46 62

This is an accepted solution.

Hi @Jode81 
I found the reason this is because Google Tag is outside the script tag in code.

Current --> 

 <!-- Google tag (gtag.js) -->
 gtag('config', 'AW-11033445427');

 

Change this to 

<script>
 <!-- Google tag (gtag.js) -->
 gtag('config', 'AW-11033445427');
</script>

 

This will solve the issue.


 

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: rajatsharma.web@gmail.com
Skype: rajatsharma.web
Jode81
Tourist
12 0 2

Hi,

 

Thankyou so much for your help, this solved my issue!!