This article is for GetFeedback Digital (app.usabilla.com).
A Single Page Application (SPA) is a website that loads all of the resources required to navigate the entire site on the first page load.
Much like tag managers and analytics codes, the default GetFeedback installation snippet is optimized for use on traditional websites where each page is loaded individually as your site visitors navigate through your website. However, if you are using a Single Page Application (SPA), you'll need to use virtual pageviews to indicate that a visitor has navigated from one page to the next.
In this article, we will explain the use of virtual pageviews for GetFeedback web campaigns.
To get started using virtual pageviews, you'll need:
Virtual pageviews are triggered by calling our Javascript API when a visitor switches from one page to another. When a virtual pageview is triggered, GetFeedback Digital updates and rechecks the current campaign targeting settings.
On websites that don't reload the entire document - and therefore don't reload the GetFeedback Digital code - a virtual pageview simulates the function of an actual pageview.
Triggering a virtual pageview allows visitors to see another campaign even if they have seen one before or have previously left feedback.
Although adding virtual pageviews allow multiple campaigns to be set up, you’ll need to schedule your campaigns carefully to avoid issues triggering your campaigns.
A virtual pageview is executed through our Javascript API, with the following command:
window.usabilla_live('virtualPageView');
This command can be triggered when a visitor moves from one page to the next. Below you'll find examples of possible implementations across commonly used Javascript frameworks.
After implementing the virtualPageView command, your website is ready to use all of our campaign targeting options.