Saturday, July 27

How to track WIX website with Google Tag Manager

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 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.

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.

GTM on WIX - 3rd step

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:

GTM WIX installation

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:

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.

Source: analyticsmania

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x