Google Tag Manager Code Insertion

New Member
1 0 0

Hi! Can anyone help me how to insert Google Tag Manager Code? It should be inserted right after <body>. I don't know if editing theme.liquid is a great idea. I'm afraid I might ruin everything. Perhaps, there's an option to easily insert the code in my shopify dashboard (such as how setting up Analytics is done) but I just don't know where to find it.

Shopify Staff
Shopify Staff
224 1 25

Hi, Lemmy!

Patrick, a Shopify Guru here :). 

At the moment, the only way to put in the Tag Manager code is directly into the HTML. Once you find the <body> you can paste your new code directly underneath. It should look something like this when your finished :)

If you're still unsure about adding it you can make a copy of your theme and test it out there first :). If you go to your theme page and click the button that looks like three dots, then from that drop down click on Duplicate. A new unpublished copy of your theme should now appear on your theme page. You can then add the code to that theme and test it out there without affecting your current one. :)

Hope that helps :)