
March 29, 2020
How to track WIX website with Google Tag Manager
Updated: March 29th, 2020. WIX is one of the most popular website builders that positions itself as “easy to use” and “allows to build gorgeous websites”). Even though such builders take away a lot of flexibility from you (especially when it comes to SEO-or-GTM-related modifications), their popularity is still solid.
When the owners of such websites start realizing that they also need to track what their website visitors are doing, Google Tag Manager + Google Analytics come as one of the first tools to consider.
Just a bit more than a year ago (early 2018) WIX added support for Google Tag Manager (meaning that you can actually implement its code and use the tool for what it does the best, controlling marketing tags and firing them when you actually need). Nevertheless, there are still some nuances people face and I decided to address them in this blog post.
So if you want to track the WIX website with Google Tag Manager, continue reading.

Quick Context
Some time ago (in 2017 and before that) WIX’es Custom HTML widgets did not function properly with GTM container code in them. And this approach still doesn’t work. The only way you could enable Google Analytics Tracking was by going to a dedicated Analytics section and adding GA tracking code there.
Yay, pageviews.
But what if I wanted to track particular clicks or other interactions happening on a website? Usually, GTM was the tool that could do that. Well, that’s too bad because WIX did not care much about it and GTM fans (WIX users) were crying in the corner (or maybe even switching to another website builder).
Thankfully, that time is over and GTM can be installed in no time.
Video: How to install GTM on WIX
If you prefer video content, you might want to take a look at this tutorial.
Install Google Tag Manager on a WIX website
First of all, this feature is only available for paid plans of WIX. If you’re still using the free plan, sorry, there’s no workaround. You’ll either need to upgrade or stay just with regular pageviews. If you’re on any premium plan, continue reading. Also, you MUST have a domain connected to the website. Otherwise, GTM integration option will not be available.
Login to your WIX account and choose the website where you wish to install GTM, click Edit Site.
Then you will be redirected to WIX’s Editor (a.k.a. ADI). In the top right corner, click Site and then choose Settings.
Then, in the left sidebar, go to Tracking & Analytics.
Finally, in the top right corner, click New Tool > Google Tag Manager.
Enter the ID of your GTM container (e.g. GTM-XXXXXXX) and click Apply. Google Tag Manager container code snippet will be added to all pages of a WIX website. You can find the GTM container ID in the top bar of Google Tag Manager account:
Test Google Tag Manager on WIX
Now, let’s test whether Google Tag Manager container was added correctly. Enable Preview and Debug mode (by hitting the Preview button in GTM), go to the website you’re working on (the public part) and refresh the page. A debug console window will appear at the bottom of your browser, showing detailed information about your tags, including their firing status and what data is being processed.
Not seeing it? Continue reading.
Important! If you don’t see the Preview and Debug mode on WIX
WIX is far from being perfect. Pretty far. I had some struggles with it even while writing this blog post. At some point of this article, WIX’s built-in Google Tag Manager integration just stopped working.
Even though I was able to add the GTM container ID (just as I have described it above), the Google Tag Manager container was not loaded on a page anymore. Direct Google Analytics integration was working fine, but not GTM.
So if this situation also applies to you, do the following.

#1. Diagnose if the GTM container is loaded at all. Once you have added the container ID to the WIX’s settings, publish the website. Then go to your website’s public section (I mean open your website as a visitor) and then open browser’s developer tools (on Windows you can do that by pressing F12). Go to the Network tab and enter gtm.js in the search field. Refresh the page. Did the search return anything that contains “gtm.js”? If yes, this means that you have some other problem. Read this guide to find a solution.
If, however, the search did not return gtm.js at all, this means that Google Tag Manager container was not even added to your website. This exact case applied to me. What’s the solution?
#2. Replace the built-in GTM integration with the custom one. Go to WIX’s analytics settings and disable the GTM integration.
Then in the top right corner, click New Tool > Custom and enter the following settings (in the first field you should paste the first (out of two) Google Tag Manager container code snippets (that is surrounded by the script tags):
This is an alternative solution that worked for me. Maybe it will work for you as well.
But wait, there’s more. Regular pageview tracking does not work on WIX
So here’s the situation. You want to start tracking pageviews with Google Analytics via GTM. You create a Pageview tag, set it to fire on all pages, refresh the preview mode, then refresh the WIX website. The Pageview tag has successfully fired and you also see it in GA’s real-time reports.
Great!
But once you continue browsing your website, you’ll start noticing that none of the subsequent pageviews are displayed in GA real-time reports (and, of course, the UA tag never fires again as well, unless you completely refresh the page). And it always happens like this: the first page view is tracked, all the subsequent: not.
Why? Because WIX websites are coded as single page applications. Even though it looks like pages are being reloaded while you’re navigating, that’s just an illusion. In fact, when you initially load the page, the entire website (or at least the large chunk of it) is loaded immediately. When you’re browsing the site, WIX is dynamically changing the view and imitates that pages are loading.
This means that Google Tag Manager container snippet is also just loaded once, hence only the first load (pageview) is tracked. How can this be solved? Luckily, WIX is sending virtual page view events every time a visitor navigates from section A to section B. That data is pushed to the Data Layer. All you need to do is to catch your Data Layer pageview events and use them to fire Universal Analytics pageview tags (or Facebook Pixel, or whatever). Here’s an example
As you can see in the screenshot above, there are two Pageviews in the event stream. The more pages you navigate through, the more of these events you’ll see. The first Page View is generated by the GTM container itself. The second Pageview event (without a space in its title) is sent by the WIX itself.
So how are we going to track page views in WIX?
Since WIX is automatically sending custom page view events to the Data Layer every time a visitor navigates to a new page, we need to catch them, turn into triggers and use them to dispatch our Google Analytics Pageview Tag.
If you want to turn a particular Data Layer event into a trigger, you’ll need to create a Custom Event Trigger. In your GTM container, go to Triggers > New > Custom Event. Enter Pageview (because it is the exact name of the event you saw in the Preview & Debug Console’s screenshot above). Note: this field is case sensitive, therefore, make sure that you enter the uppercase P.
Add the custom event trigger to the GA Pageview tag
Next step, you need to update your GA pageview tag in Google Tag Manager. Prior to reading this guide, it was most likely that your GA Pageview Tag already had All Pages trigger. This time, remove the existing “All Pages” trigger and add the Custom Event trigger that we created in this guide.
What does it mean? Every time a visitor lands on your website browses it (read: goes to another page), WIX will push custom Pageview events to the Data Layer, thus your Custom Event trigger will activate. That trigger will fire a GA Page View tag and you should see that data in the GA Real-time reports.
Test pageviews
After you implement all the changes I’ve described above, refresh the Preview and Debug (P&D) mode in GTM, reload the WIX website you’re currently working on. Start browsing it. You should see that GA Page View tag fires with every custom Pageview event in the P&D console. That’s the result you should expect. If the tag does not fire, make sure that you enter Pageview event name in the Custom Event trigger properly (with the uppercase P).
Next step, go to GA Real-time reports and check whether your page views are properly tracked in the Overview section.
Prevent rogue referral issue
As I’ve mentioned at the beginning of this guide, WIX websites behave as single-page websites (meaning that they do not reload the entire page as a visitor navigates from one page to another). This causes problems with the referral data in your GA reports as the data becomes inaccurate. This is especially harmful if you are receiving paid traffic (e.g. from Google Ads). Therefore, you need to implement an additional solution provided by Simo Ahava.
Next stop: click tracking
If you want to track which elements are being clicked the most, which links are driving your visitors away, etc., read this guide. Here I have explained the essentials you need to know about in order to track clicks with Google Tag Manager on your WIX website.
Here is some food for thought:
- Track outbound link clicks
- Track contact link clicks (emails, phone numbers)
- Track document downloads (e.g. pdf, docx, xlsx, etc.)
- Track calls to action (main buttons)

Going further: WIX form tracking with Google Tag Manager
Form is another important website element that webmasters and marketers are willing to track. They usually mean micro or macro conversions to businesses. Newsletter subscriptions, lead form submissions, etc. All of them should be tracked in order to get a better understanding of where converters are coming from.
I haven’t tried all of WIX’s form plugins but I’ve noticed that default ones are actually pushing form submissions to the Data Layer (which is good!). When you submit the form on your WIX website, check the Preview and Debug mode. Did some event appear? If you have enabled the built-in GTM integration, you might see an event called lead.
So if that’s also the case of yours, all you have to do now is to create a Custom Event Trigger in GTM that will catch that lead event and you’ll be able to use that as a tag firing condition (trigger).
Then assign this trigger to the tag you want to fire (it might be GA Event tag, Google Ads conversion tag or anything else).
If you haven’t enabled GTM built-in feature of WIX (maybe it’s not working for you), there are other options as well. Form tracking isn’t easy if you’re just starting with GTM. There are multiple types of forms online, hence many form tracking methods. In fact, as of the moment of writing this post, I’ve published 7. This is another extensive guide that might take require a lot of your effort. So if you’re looking for other ways how to track form submissions, check my form tracking guide and you’ll eventually find something useful. E.g. Element Visibility trigger might be a solution.
Can’t get enough?
If you’re looking for more ideas/inspiration what to track on WIX website with Google Tag Manager, here’s a list of 99 things you can do with GTM. While not all of them will be possible on WIX, make sure you check them out. For example, you might want to implement scroll tracking.
Track WIX website with Google Tag Manager: Final words
If you want to track WIX website with Google Tag Manager, you need to keep in mind several nuances. First of all, you cannot just simply paste GTM container’s code snippet to the Custom HTML block in WIX’es editor. That will not work. Instead, you should use a feature dedicated for that (available in website’s settings).
Furthermore, WIX websites are coded as single page applications. This means that by default only the first pageview is tracked. All the subsequent ones — not so much. That’s why you need to do some additional modifications in the GTM container to catch those “virtual” page views as well.
But other than that, the rest of the tracking should work properly. Unless you are expecting a developer to push some custom data to the Data Layer. I really doubt that this is possible but, on the other hand, when I had to work with WIX websites they were fairly small and there was no need for developer’s input.
If you see that I missed some important nuance (because maybe I just never had faced it), let me know in the comments.
By the way, if you are feeling stuck with Google Tag Manager in general, check my Google Tag Manager course where a lot of the techniques from this blog post are explained in greater detail and logical flow.
23 COMMENTS
As a recent entrant to the GTM world, and as someone using (and struggling with) wix, I found your blog post as a goldmine of information. I'm surprised why not many wix users have commented here, as compared to some of your other posts. Thanks for all the genius tips.
I have one question. I successfully troubleshooted the debug panel on my wix site, following your advice. However, when I tried to change the GA tag trigger from all pages to custom event, the tags stopped firing (even when I hard refreshed / no page views in both debug panel and GA).
I did capitalize the "P" in "Pageview". Puzzled!
Then you could try using the History Change trigger to track pageviews https://www.analyticsmania.com/post/single-page-web-app-with-google-tag-manager/
This article is gold! I have got my pageview tags firing correctly now, however I am now seeing two pageviews in GA for every event. Is this because I also have GA connected in WIX setup?
Yes
Hello, I want to track chat window open events (ascend by wix) with GTM. By using custom event or click event methods, it didn't work. I see that chat ribbon/button doesn't have a unique id, this can be a problem. However when you open a chat box, GTM preview record something called "open - chat" How can I track it as an event? Thank you.
If you see such an event in the preview and debug mode ("open - chat") just create a custom event trigger for that exact event (opent - chat).
Hi Julius,
Thank you for the guide! I used it and it has been working fine, but I want to doublecheck:
The Wix support page for GTM mentions 2 extra steps:
1) Create a data layer variable "url"
2) Use the override settings in GA and add a custom field "page" with "url" as the variable.
Is this step still necessary?
Thank you for your feedback!
Depends on how the URL changes in the browser. If it contains #, then also use that variable. If the url looks usual and does not contain #, then the step is not necessary
It seems Wix has some weird caching going on that you cannot refresh manually.
When I first added the tracking code it was not showing up so I dug around for the cache features but none to be found.
A neat little trick is to add "?bypass-cache" on the end of your domain so you get the lastest version e.g.
https://domain.com/?bypass-cache
GTM debug mode showed up instantly for me!
Amazing article, as always.
Every time I have an issue related to GTM, I manage to solve it through here, with the least hassle possible. Thanks a lot, Julius!
This is a brilliant article, thanks!
If one sets up pageview tracking as you suggest (via GTM) should the Google Analytics connection inside WIX be removed in order to track pageviews and everything correctly?
Yes.
Hi Julius. I came across your article because you were talking about GTM and Wix combined. Unfortunately, you mention the following: "Unless you are expecting a developer to push some custom data to the Data Layer. I really doubt that this is possible but, on the other hand, when I had to work with WIX websites they were fairly small and there was no need for developer’s input." I guess I am the exception to that... Do you know of any node.js libraries that might help me push data towards the Data Layer of GTM through Wix's backend code? I did a search, but I couldn't find anything which might help me achieve that.
Thanks for your input!
Is it possible to use node.js with WIX at all? I really doubt that.
I have spent days on this, including going through all 17 of the other debug options.
Adding the GTM manager via custom code snippet (header and body) finally opened a debug window on my site (and I know now, installed the code, which was apparently the problem).
Thank you sir!
Hi Julius,
Thanks for this article it helped to understand the root cause of my problem. I use Wix site and faced problem when Preview panel does not appear. Looks like the problem of Chrome caching mechanism as described in another your article. If I use https://domain.com/?bypass-cache, as advised above, it works (but also not on all pages.... not sure why). I want to add also that it's not only about Preview panel is not appearing. It's also about GTM scripts do not work at all. And this means that no information i sent to GTM, i.e. when tag defined in GTM is triggered - info i just not sent to GTM/Analytics from site. I set up Phone Number clicks tracking (click text containing phone number) and this info is not passed to GTM/Analytics. Luckily I found your page...
I want to try your workaround proposed, but can not copypaste script text, as for me its shown as a picture (and does not show all script text). Not sure what is the problem here (as I see other people here can copy it), Can you please duplicate script text here as a reply?
Also general question: did you or anybody else tried to bring Wix support attention to this problem?
This is the standard GTM tracking code script. Login to your account and click on the container id to get that script.
Thank you!
Hello! Adding the custom GTM code worked to get the GTM preview mode to load, but it messes with my Anchor tags and download links on my WIX site. Any thoughts on this?
Thanks!
This means that some tags in your container are doing this. GTM by itself should not be doing that.
Awesome! Thanks so much. I dind't even realize I had this pageview problem and now it's fixed! Next steps: get my Wix Forms subs tracking and figure out how to track button clicks and other engagements from different Ads, and, and, and...
Thank you!
Hi Julius,
I am in the process of starting to track my Wix website with Google Tag Manager and GA4. As I've had some issue at first, I came across your article. Since it is a bit older already, I was wondering if Wix still doesn't support GTM properly? Or have your mentioned issues been resolved in the meantime?
Thanks a lot for your help!