Steps to Add Google Tag Manager to Your Wix Site
Wix, a popular website builder, enables users to create stunning, professional websites without coding knowledge. However, integrating advanced analytics and marketing tools often requires a bit more technical savvy. This is where Google Tag Manager (GTM) comes in, offering a simple solution to manage and deploy marketing tags on your Wix site. In this guide, we'll dive into how to add Google Tag Manager to your Wix website, step by step. Let's get started.
Before we begin, ensure you have Google Tag Manager set up and have created your container. If you haven't, visit the official Google Tag Manager documentation to get started. Once you're set, let's dive into integrating GTM with your Wix site.
Adding Google Tag Manager to Wix
Adding Google Tag Manager to your Wix site involves a few simple steps. We'll break these down into manageable sections to keep the process smooth.
First, you need to add GTM's <noscript> section to your Wix site's head section. This is a crucial step as it ensures your GTM container works correctly. Let's dive into this in the next subheading.
Adding GTM's <noscript> Section to Wix
To add GTM's <noscript> section to your Wix site, follow these steps:
- From your Wix Editor, click on Settings in the left menu.
- Under Advanced, choose XML code.
- Select the Head option on the box that opens.
- Paste the following code into the box:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-');</script>
<!-- End Google Tag Manager -->
Replace GTM- with your unique container ID.
After pasting the code, click Apply. This adds the necessary JavaScript to your Wix site's head section.
Adding GTM's <noscript> Content to Wix
Next, you need to add the <noscript> part of the code to your Wix site. This ensures that GTM works correctly if JavaScript is disabled in the user's browser. Follow these steps:
- From the Wix Editor, click on Add in the top toolbar.
- Choose More and then select HTML (/-code).
- Drag and drop the HTML element to the desired location on your page.
- Click on the HTML element to open its settings.
- Paste the following code into the HTML box:
<noscript>
<div><img height="1" width="1" style="display:none" src="https://www.googletagmanager.com/ns.html?id=GTM-" />
</div>
</noscript>
Replace GTM- with your unique container ID.
After pasting the code, click Apply. This adds the <noscript> section to your Wix site.
Testing and Verifying GTM on Your Wix Site
After adding GTM to your Wix site, it's crucial to test and verify that it's working correctly. Google provides a preview and debug mode in GTM that allows you to test your tags instantly.
To access these features, log in to your Google Tag Manager account, select your container, and click on Preview in the top right corner. Then, enter your Wix site's URL and hit OK. This will open your site in a new tab, with the GTM console overlayed. You can now test your tags and verify that they're firing as expected.
Once you've tested your tags, click Exit Preview in the GTM console. If everything is working correctly, you can now publish your GTM container by clicking on Submit in the top right corner of the GTM interface.
Congratulations! You've successfully added Google Tag Manager to your Wix site. Now you can start managing and deploying marketing tags seamlessly, enhancing your website's analytics and marketing capabilities.
Remember, the effectiveness of your tags relies heavily on their configuration and purpose. Regularly review your GTM setup and make adjustments as needed to ensure you're gaining the most insights and reaching your marketing goals. Happy managing!