About cookies on this site

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. Learn more

Cookie settings

About cookies on this site

Cookies used on the site are categorized and below you can read about each category and allow or deny some or all of them. Learn more

Necessary

Some cookies are required to provide core functionality. The website won't function properly without these cookies and they are enabled by default and cannot be disabled.

Preferences

Preference cookies enables the web site to remember information to customize how the web site looks or behaves for each user. This may include storing selected currency, region, language or color theme.

Analytical cookies

Analytical cookies help us improve our website by collecting and reporting information on its usage.

Marketing cookies

Marketing cookies are used to track visitors across websites to allow publishers to display relevant and engaging advertisements. By enabling marketing cookies, you grant permission for personalized advertising across various platforms.

  • Courses
    • Paid courses
    • Course bundles
    • Free courses
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • Paid courses
    • Course bundles
    • Free courses
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

May 3, 2019

How to Track WIX Pageviews with Google Tag Manager

In 2018, WIX added 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.

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners

 

Video tutorial

By the way, I have recorded a video where I explain how to install GTM on WIX and how to track pageviews. As for the moment of publishing this video, I think that it is the most robust solution and I currently recommend following it (instead of using the built-in GTM functionality within WIX).

If however, you don’t find this video helpful, continue reading the blog post

 

The Problem

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.

Subscribe and Get the Ebook - Mastering GA4 event tracking

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

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. Therefore, you need to implement an additional solution provided by Simo Ahava.

 

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.

Subscribe and Get the Ebook - Real Book Img - GTM for Beginners
Julius Fedorovicius
In Google Tag Manager Tips
6 COMMENTS
Ken Roberts
  • Jan 15 2019
  • Reply

This is helpful. Do you know of a way to track other events on a Wix site with GTM, such as form submits?

Thanks

    Julius Fedorovicius
    • Jan 15 2019
    • Reply

    Hey, no, I don't but you can try this guide for form tracking https://www.analyticsmania.com/post/google-tag-manager-form-tracking/

    And this one for clicks https://www.analyticsmania.com/post/google-tag-manager-click-tracking/

      Ken Roberts
      • Jan 16 2019
      • Reply

      Thanks -- I saw the form tracking post and used the Element Visibility option to do this (since we happen to have success messages that are hidden until a successful form submit).

      The usual Wix challenge is that the ID you give the element in the Wix Editor for design and Wix Code access is NOT what ends up in the final HTML sent to the browser. So you have to Inspect the page source in a browser and see what ID Wix assigned your elements as and use that value instead.

      Anyhow, thanks for the good material on GTM and GA.

Catalina
  • Jan 18 2019
  • Reply

Great article as always! Thanks!

Gina
  • Apr 6 2019
  • Reply

Hi...Hoping you can help me out. I'm new to GTM and have a Wix website. I noticed it was only tracking the first page the user landed on, so did some research and found your blog posts. I setup the tags in GTM per your instructions and Simo to take care of the rogue referral issue. Everything works, but it generates an error in Tag Assistant: same web property ID is tracked twice. If I delete the Custom Event Pageview trigger and just have the regular All Pages tag, the error goes away, but then it doesn't track the movement to different pages in GA. I also tried it with the History Change trigger and again it works, but generates the GA error, same web property ID is tracked twice. One thing I did notice is that the lightbox form that I have on several pages, generates a duplicate Pageview when it appears and then another one when you click to remove it. So for each page the lightbox is on, it generates two additional Pageviews. I can see this happening in the realtime GA report. Any guidance you can offer would be greatly appreciated. Thanks!

    Byron Trzeciak
    • Dec 19 2019
    • Reply

    Seeing the same issue as Gina, I'm not sure if something has changed recently but for some reason my tags are now firing multiple times, every time the Pageview custom event fires. Instead of 5 tags, I can easily get up to 9 or 12 once I've browsed a few pages. I've set up conversion tracking alot, especially through Google Tag Manager, but never seen this issue. Anyone solve the issue Gina is having?

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *


 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • How to Set Up Google Tag Manager Server-side Tagging with Cloud Run
  • Quick Guide: dataLayer.push with examples
  • Google Tag Manager Server-Side Tagging with Stape
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings