Google Tag Manager is a free tool that allows you to manage and deploy marketing tags (snippets of code used for tracking and analytics) on your website or mobile app without having to modify the code. Once you’ve added the Google Tag Manager code to your site, you can use the Tag Manager interface to add and update your tags.
What is a Google Tag?
Exciting update! We've collaborated with Wix to offer WBI users with a free plan for all website creation needs - Explore the details here.
A Google Tag is a snippet of code that allows you to track and analyze your website or mobile app’s traffic. Google Tags can be used for a variety of purposes, such as tracking pageviews, clicks, form submissions, and transactions. Adding a Google Tag to your website or app is quick and easy, and can be done without having to modify the code.
How do I add a Google Tag to my Wix website?
Adding a Google Tag to your Wix website is quick and easy. Simply follow these steps:
- Log in to your Wix account and select the site you want to edit.
- Click the gear icon in the top right-hand corner and select Site Manager.
- In the Site Manager, click Tracking & Analytics.
- Click +New Tool.
- Select “Custom” from the first drop-down menu.
- Enter the name of your tag in the “Name” field. This is for your own reference and will not be visible to visitors. For example, you might name it “Google Analytics”.
- “Paste your tag code”. In this field, paste the entire code snippet that you copied from Google Tag Manager.
For example:
<!-- 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-XXXXXXX');</script>
<!-- End Google Tag Manager -->
- Click “Apply”.
- Your Google Tag will now be added to your Wix website.
Note: If you are using Google Tag Manager to manage your Google Analytics tracking code, you will need to remove the old Google Analytics code from your Wix site and replace it with the Google Tag Manager code. This will ensure that your Google Analytics tracking is properly integrated with Google Tag Manager.
Using Google Tag Manager can save you time and hassle by allowing you to manage and update your tags without having to modify the code of your website or app. Give it a try and see how it can streamline your tracking and analytics efforts.
Now that you’ve added the Google Tag Manager code to your site , you can use the Tag Manager interface to add and update your tags.
Here is the code snippet for the Global Site Tag (gtag.js) for Google Analytics:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXX-X');
</script>
Replace “UA-XXXXXXXXX-X” with your own Google Analytics tracking ID. This code should be added to the <head>
of your website’s HTML code.
Note that this code snippet is for the Global Site Tag (gtag.js) version of Google Analytics. If you are using the older analytics.js version, the code snippet will be slightly different. You can find more information on the different versions of Google Analytics tracking code here: https://developers.google.com/analytics/devguides/collection/gtagjs/migration
I hope this helps! Let me know if you have any further questions.