Product Guide
  • Introduction
  • Product Training
    • Account & Project Management
    • Product Feedback Management
    • Product Guide For Session Replay & Heatmap
  • installation
    • Web
      • JavaScript SDK
      • Google Tag Manager
    • Mobile App SDK
      • Android Survey SDK
      • IOS Survey SDK
      • React Native SDK
    • Converse AI
      • Create a new Converse AI
      • Configure Conversation
  • Compose Survey
    • Create With AI
    • Survey From Scratch
    • Survey Templates
    • Enterprise Surveys
    • In-Product Surveys
    • Prototype Tests
    • Replays
    • Website Feedback Button
    • In-Product Video Widget
  • Survey Designer
    • Survey Theme
    • Survey Question Types
      • Welcome Page
      • Net Promoter Score (NPS)
      • Customer Satisfaction Score (CSAT)
      • Customer Effort Score (CES)
      • Video
    • Advance Survey Design
    • Survey Design Guidelines
  • Launch Survey
    • Web Surveys
    • Social Media Survey
    • Email Survey
    • Bulk Email Surveys
    • SMS Survey
      • SMS Survey By Link
    • Website Feedback
    • Events
  • Survey Branching
    • Jumping Questions
    • Disqualify Response
    • Terminate
  • Integration
    • Shopify
    • Slack
    • Google Sheet
    • Zendesk
    • Freshdesk
    • Zapier
    • Google Analytics
    • Square Online Integration
  • Workflows
    • Salesforce Workflow
      • Create an email campaign for Salesforce Case/Opportunity.
      • Map survey response data into Salesforce
        • Create event-based Salesforce workflow
      • Import contact data from Salesforce to Qwary
    • Zendesk Workflow
      • Send post-resolution email surveys campaign
      • Map survey response data into Zendesk
        • Event-based Zendesk workflow
    • Snowflake Workflow
  • Insights
    • Standard Reporting
    • NPS Reporting
    • CSAT/CES Rating
    • Key Driver Analysis
    • Text AI
      • Topics
  • Team Collaboration
    • Invite Team Member
    • Share Survey
    • Share Dashboard
  • Closed Feedback Loop
    • Workflow
    • Native Case Management System
    • Rule Based Email Notifications
  • Use Cases
    • Product Onboarding Surveys
    • Review Generation Campaigns
    • Square Online Customer Feedback
    • Ultimate Guide To Net Promoter Score (NPS)
    • Ultimate Guide For Customer Satisfaction Score (CSAT)
    • Ultimate Guide For Customer Effort Score (CES)
    • Product Survey Questions Guide
    • Segment customers for Email/SMS Surveys
  • Videos
    • Create a Survey
    • Create a Video Survey
    • Question Types
    • Design a Survey
    • Branching
    • Multilingual Surveys
    • Settings
    • Responses Settings
    • Distribute Survey
    • Square Online Integration
    • Analysis
    • Company Settings
    • Page
  • FAQ
    • Delete Test Responses
    • Turn off Qwary Branding
    • How to Configure Custom SMTP for Your Survey?
    • How to Request CNAME?
    • How to use Survey Variables?
    • Adding Hyperlink to Survey Text
    • GDPR Compliance
    • Survey Phishing
    • Enable GeoIP Collection for Your Survey
    • Add Custom Contact Field
    • Unsubscribe Contacts from List
    • Customize Image Size
    • Close Survey on Specific Date
    • Install Qwary Intercept with Single Page Applications
    • Move Survey Question
    • Download Response
    • Enable Partial Submission
  • Account & Billing Management
    • Reset Password
    • Invite Team Member
  • Converse AI
Powered by GitBook
On this page

Was this helpful?

  1. FAQ

Install Qwary Intercept with Single Page Applications

An SPA is a type of website that loads all the resources needed to navigate the entire site on the initial page load, unlike traditional websites that load each page individually as visitors navigate through the site. However, the default Qwary installation snippet, similar to tag managers and analytics codes, is optimized for traditional websites. If you have an SPA, you'll need to use refresh pageviews to indicate when a visitor has moved from one page to the next. In this article, we'll explain how to use refresh pageviews for Qwary intercept campaigns.

This article will cover the usage of refresh pageviews for Qwary intercept campaigns.

These requirements will be elaborated upon in the following sections.

  • Refresh pageviews in Qwary simulate the function of an actual pageview on websites that do not reload the entire document.

  • They are triggered by calling Qwary's Javascript API when a visitor switches from one page to another.

  • When a refresh pageview is triggered, Qwary updates and rechecks the current campaign targeting settings to ensure accuracy.

  • There are several targeting options available for refresh pageviews in Qwary, including visitor on a particular page, visitors after being on the page for X seconds, visitors potentially exiting the page after X seconds, visitors having viewed at least X pages, and manual trigger.

  • The refresh pageviews targeting options help ensure that your campaign targeting is accurate and up-to-date, and can be used to achieve your goals.

How to setup virtual pageview?

qwTracking.refreshPageView() command is used to trigger page refresh by SDK API.

  1. Vanila JS

window.history.pushState('p1', 'Test Title', '/test_page.html');

window.qwTracking.refreshPageView();

  1. Angular 2 Router

import { Router, NavigationStart, Event as NavigationEvent } from '@angular/router';

constructor(router:Router) { router.events.forEach((event: NavigationEvent) => { if(event instanceof NavigationEnd) { window.qwTracking.refreshPageView(); } }); }

  1. VueJS Router

import router from './router';

router.afterEach((to, from) => { window.qwTracking.refreshPageView(); });

new Vue({ el: '#app', router, template: '', components: { App } })

  1. React JS Router

Router.run(routes, Router.HistoryLocation, function (Handler) { React.render(, document.body); window.qwTracking.refreshPageView(); });

In conclusion, refresh pageviews are a way for Qwary to update and recheck campaign targeting settings when a visitor switches from one page to another.

PreviousClose Survey on Specific DateNextMove Survey Question

Last updated 2 years ago

Was this helpful?