Sunday, December 22

How to Track WIX Pageviews with Google Tag Manager

Earlier this year (February 2018, to be precise) WIX added a built-in support of Google Tag Manager. Finally, their users can without a hassle implement custom tracking techniques that are available in the GTM toolkit. By completing all the necessary steps, your GTM container can be added to all pages of your WIX store. However, there is still one nuance you need to keep in mind in order to properly track such a basic interaction as page views.

You see, the problem is that when a visitor navigates from one page to another (of the WIX-hosted website), the page actually does not reload, therefore, all the subsequent page views will not be tracked… unless you continue reading because, in this guide, I’ll show you how to track WIX pageviews with Google Tag Manager.

One of my Google Tag Manager Course students recently has contacted me for help. When she enabled GTM Preview and Debug mode, she started seeing multiple Page View events in her console.

As you can see in the screenshot above, there are two Pageviews in the event stream. The more pages you navigate through, the more such events you’ll see.

Why are there so many Page View events?

Apparently, WIX websites behave as single-page websites. Even though the content of pages is changing when a visitor is navigating, the page does not fully reload. This means that all the default pageview-based GTM triggers (All Pages, DOM Ready, and Window Loaded) will be activated only once, on the initial page load. All the subsequent page views will not be tracked.

How can this be solved? By asking developers to push custom events to the Data Layer every time a visitor navigates to another page. Luckily, WIX devs have already done that. See the 2nd “Pageview” event in the screenshot above? That’s a custom Data Layer event.

Please note that the default page view event consists of two words (Page View) while WIX’s custom Pageview event name is one word.

So what’s the plan?

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, add the additional trigger that we created in this guide, Custom Event Trigger.

What does it mean? When the page initially loads, the All Pages trigger will fire your GA Pageview tag. When a visitor continues to browse the website, 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

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.

How to track WIX pageviews with Google Tag Manager: Final words

So here’s a quick tip on how to properly track WIX pageviews with GTM. Remember, if you implement GTM by following this guide, you’ll start seeing custom Pageview events in the Data Layer. Use them as conditions to send page views to Google Analytics.

You can do that by creating a Custom Event trigger and adding it to the GA Pageview tag.

 

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