--- title: "Confirmation Page Integration on Single Page Applications" slug: "confirmation-page-integration-on-single-page-applications" description: "Explains preventing duplicate conversions on SPA confirmation pages by resetting the Insider page type after a successful request, with a code sample." tags: ["spa confirmation page"] updated: 2026-11-20T13:33:21Z published: 2026-11-20T13:33:21Z canonical: "academy.insiderone.com/confirmation-page-integration-on-single-page-applications" --- > ## Documentation Index > Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt > Use this file to discover all available pages before exploring further. # Confirmation Page Integration on Single Page Applications > If you have integrated or are integrating the [Web SDK](https://academy.insiderone.com/docs/insider-web-sdk-integration-guide), you can skip this guide, as this function will be covered in the Web SDK. > Now you can complete this integration on Insider One's new onboarding center. Refer to [Insider Onboarding Center](https://academy.insiderone.com/docs/insider-onboarding-center) for further details. If your website is a single-page application (SPA) or has single-page flows, the information you pass to the Insider Object on a page might persist after the page changes. For example, if a user completes a transaction and visits the After Payment (success) page, you will pass the page type as Confirmation. If this user refreshes the After Payment page, this act will be considered a new transaction. In this case, the conversions will be duplicated. To prevent this, pass the page type information only once on the After Payment page, then delete it. The following example shows how to implement this update. The following code snippet listens for Insider requests and checks the page type upon a successful request. Then it sets the page type to Other when the user visits the confirmation page. This helps eliminate duplicate conversions. ```javascript window.insider_object = {    page: {        type: 'Confirmation'    } }; ajaxListenerConfirmation = function (callback) {    'use strict';    var oldOpen = XMLHttpRequest.prototype.open;    XMLHttpRequest.prototype.open = function (method, url) {        this.addEventListener('readystatechange', function () {            if (this.responseType !== 'arraybuffer' && this.responseType !== 'blob' &&                this.readyState === 4 && this.status === 200 && typeof callback === 'function') {                callback(url, this.response, method);            }        });        oldOpen.apply(this, arguments);    }; }; ajaxListenerConfirmation(function (url, response, method) {    if (method.toLowerCase() === 'post' && url.indexOf('/hit') > -1 &&        window.insider_object.page.type === 'Confirmation') {        window.insider_object = {            page: {                type: 'Other'            }        };    } }); ``` ## Related - [Integrate Insider Tag into your website](/integrate-insider-tag-into-your-website.md) - [Insider Web SDK](/insider-web-sdk.md) - [Test the Insider Tag integration](/test-the-insider-tag-integration.md) - [Integrate Insider One into your Confirmation page](/integrate-insider-into-your-confirmation-page.md) - [Test the Confirmation page integration](/test-the-confirmation-page-integration.md)