Setting up Google Tag Manager on Your Shopify Store
by ShahzadaAliHassan - 27th October 2023Introduction
In this blog, we'll dive deep into how you can configure Google Tag Manager (GTM) on your Shopify store. This detailed guide will provide you with step-by-step instructions, ensuring a seamless setup process.
Google Tag Manager allows us to manage and deploy marketing tags on our website without modifying the code. This is especially useful for those who aren’t developers.
Prerequisites:
- A Google Account (assuming everyone has one).
- A Shopify store.
If you're all set, let's dive in!
Setting Up Your GTM Account
For those who already have a GTM account:
- Log in to your account. You will see your existing containers. But if you're new, you won't see any.
- Click on Create Account on the top right.
- Enter the name of your company or business.
- Under the container, set up the URL of your website.
Tip: It's best to use one GTM container per business. If you have multiple domains for the same business, use one container.
Integrating GTM on Shopify
Now, we need to place the GTM code snippets on your Shopify store. Don't worry; it's just copying and pasting.
- Head to Google Tag Manager > Settings > Install Google Tag Manager. You'll find two snippets:
- One for the head section of your site.
- One for the body section.
- Copy the head snippet.
- Go to your Shopify dashboard > Online Store > Themes > Click the three dots (…) > Edit Code.
- Navigate to the theme section, and right under the
<head>
, paste the code you copied. - Now, go back to GTM and copy the body snippet.
- In Shopify's code editor, find the
<body>
tag. You can use Ctrl + F or Command + F to search. - Paste the body code snippet right after the opening
<body>
tag.
Note: It's a good practice to make a duplicate (backup) of your theme before editing its code. This ensures you have a fallback in case of any mistakes.
Conclusion
With these steps, Google Tag Manager should now be correctly set up on your Shopify store. You can now easily track events, understand your audience better, and improve your marketing strategies.
Remember, if you're ever in doubt, there's always a community willing to help out. Join forums, ask questions, and always keep learning.
Happy tagging!