Pageviews are one of the best known metrics, present in almost all web analytics reports.
This metric is populated with pageview hits, which are sent to Google Analytics every time we view a page or refresh the page itself.
However, in recent years a series of technologies have developed that improve user navigation on the site (classic example: Single Page Applications) but which create problems in their tracking.
With these applications, the content of the page changes as the user navigates, the URL changes, yet the page does not reload.
If the page does not reload, the pageview hit is not sent to Google Analytics.
Very often it happens that not the whole website is developed with an Ajax-like technology, but only some parts of it.
What happens in these cases?
- you can track the whole website normally
- you can’t trace pages with this technology
It may happen that you are unable to track page views in crucial points, for example in the sellout funnel: these are precisely the cases in which virtual pages are needed.
What is a virtual page
The Virtual Page is a page that does not exist on your website, but that you are creating in order to send a pageview hit.
By creating this hit, it is possible to get around the obstacle and, in all those pages of your website, where the content does not reload, you can use this virtual page to send the hit to Google Analytics anyway.
By doing so, GA receives the information of where the user is and you can use this information for your own analyzes.
Virtual Pages: practical cases
There are several cases in which, the Virtual Pages, come to the rescue:
- Single Page Application (SPA): As mentioned above, SPA can request the use of virtual pages. There is no need to create virtual pages on all pages of your website, but it can be useful to use them in certain places. If you want to know how to track Single Page Applications, read my dedicated post;
- Checkout: it is very useful to use the Virtual Pages in this area of the website, where, often, the user makes different interactions but the URL does not change;
Virtual Pages and Google Analytics
Once I have created the Virtual Page, I can easily use it like any other page on my site.
For example, I can decide to set it as a Goal and give it a value:
Or I can insert virtual pages into a Funnel so that my Goal is completed:
Inspecting the Chrome Console, the Virtual Pages will appear within the hit pageview like any other page, with:
- its URL
- the title you can give it when you create it
If you want to find out how to implement virtual pages on your website with the help of Google Tag Manager and Google Analytics, read my complete guide in this post. In a few steps, by creating dedicated tags and triggers you will see how to inject virtual pages in certain points of your site and how to set a Goal in GA.
You may also be interested by the following articles:
- Google Analytics 4: source/medium reportOne of the most popular reports within the Universal Analytics version is definitely the Source/Medium Report. In this Report, you can quickly observe the source and medium of users landing on the website. In UA we can find it under Acquisition > All Traffic > Source/Medium The new version of GA4 offers many features but […]
- Landing Pages Report in GA4One of the most interesting reports in Google Analytics – Universal Analytics is the Landing Pages Report. In this report you can observe the first landing page of a user on the analyzed website. It’s a very useful report to quickly understand what our user’s entry points are. However, the question may arise: how do […]
- Google Analytics 4: ComparisonIn this post, I’ll show you how to compare data in Google Analytics 4. Just as with the UA (Universal Analytics) version, where you can use segments to better analyze your users’ behavior on the site, GA4 offers a similar feature. However, there are some nuances, compared to the UA version. Compare data in GA4 […]
- Search Console and Google Analytics 4In this post I will show you two things that I find very useful: Connect the Google Search Console directly to your Google Analytics Property 4 Save a widget for faster access to Search Console data in the GA4 User Interface Let’s start! How to Link Search Console to GA4 Property The steps to link […]
- How to Change Language in Google Data StudioGoogle Data Studio is a great data visualization tool that is completely free, allowing you to connect different data sources to create dashboards. Some of the available data sources are: Google Analytics Google Sheets Google BigQuery File in .csv etc. The sources are different and, as you have seen, they are not only from the […]
- How to Implement Content Group in Google Analytics 4Content Groups allow you to create sections of the website, grouping contents in a convenient way for your analysis. Let’s give some examples: I can create a specific group that shows me the most viewed Brands on my website or I can create Product categories to analyze, at a higher level, the interactions of users […]
- Server-side Tagging: what is it?Update: October 5th. Google Tag Manager Server Side is officially out of Beta, as confirmed by Google, and has entered a new phase. Announced in August 2020, Google Tag Manager Server-side is still a tool / theme unknown to most. There are many doubts and questions on the subject and in this post I want […]