Introduction to Virtual Pageview

Contact Us or call 1-877-932-8228
Introduction to Virtual Pageview

Introduction to Virtual Pageview

By default, Google Analytics tracks viewed pages by calling the JavaScript method called _trackPageview () in the GATC. Google Analytics records the URI directly from your web browser and displays it in the report as the pageview.

However, you are allowed to override this normal function by modifying the _trackPageview method to create virtual pageviews. For example:

gaq.push(['_trackPageview','pass any alpha numeric value']);

gaq.push(['_trackPageview', '/courses/ILO/Web Analytics/GoogleAnalytics101']);

In the first example, the parentheses contains a pseudo page name i.e. 'my first virtual page view' and in the second example the parentheses contains a pseudo directory structure.

Why to Use Virtual Pageviews

Virtual pageviews are extremely helpful in the following situations:

  1. Your website has a complex URL structure due to dynamically generated web pages.
  2. You want to track file downloads.
  3. You want to track outbound links.