Single page application functions

When implementing on a single page application, you should include the isSPA parameter in your client configuration script and set the value to true

window._sp_queue = [];
window._sp_ = {
    config: {
        accountId: 1584,
        baseEndpoint: '',
        ccpa: { },
        gdpr: { },
        propertyHref: '',
        authCookie: 'test_uuid',
        campaignEnv: 'stage',
        isSPA: true,

Including the isSPA parameter will confirm the implementation for a single page application and enable the use of the following functions:

Function Description

Trigger the function in order to surface a message on a single page application. This function should be called on each (virtual) pageload.

  Note: A message will only surface if your configured scenario dictates that a message should appear.

window._sp_.destroyMessages(); Trigger the function to dismiss all messages.
Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.