Can I insert a Google Tag Manager Pixel using the Shopify Script Tag?

9 0 0

Hi All,

I want to insert a GTM tag on a website using a custom app.

Can I insert the GTM Tag using the ScriptTag Post method given(

If Yes, What should be the content of the JS file that i am loading on the website, as the GTM tag has two parts (one to be inserted in the head and the other one in the body section)?

Can someone please help me with the same.

PFB Sample GTM code:

<!-- Google Tag Manager -->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->

After opening of body tag:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="*******"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

Can someone please help me out with how to insert a GTM code(above mentioned) using the Script Tag method of Shopify.
Ashlesha Deshpande