How can you generate a virtual pageview for an event?

What is a virtual page view?

The virtual pageview is used to send a page view hit to the Google Analytics. The pageview hit is sent to the Google Analytics only when the page reloads. The virtual page view is a way to send page view hits to the Google Analytics without reloading a page. There can be various reason to send virtual page view to the Google Analytics.

  1. If a form doesn’t reload then sent a virtual pageview (also known as VPV) on form submit
  2. Track pop-ups like image, information, etc.
  3. To track the same page with multi-steps for a shopping cart.

A virtual pageview is an answer to your above problems. The Google Analytics consider Pageview like a new page URL, so you can use this URL to create Destination goals, Goal Funnels, and more.

There are two ways to implement virtual pageview

  1. Using UA implementation

you would use the following for a virtual pageview

ga('send', 'pageview', 'page path');

Instead of similar to the following for the event tracking

ga('send', 'event', 'category', 'action', 'opt_label', opt_value, {'nonInteraction': 1});

for example

onclick="ga('send', 'pageview', 'page path');


        2. Using GTM implementation

You can create new pageview tag and change page variable value in a field to set. It’s same like creating an event tracking tag, however, here type of tag will be pageview tag, the trigger you have to modify according to the need.

virtual pageview



Tracking Virtual Pageviews with Google Tag Manager is the easiest way to implement. You can even use UA implementation, but you need to involve developer for the same, on the other hand, you can perform everything from the GTM.

You may also like...

Leave a Reply