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

//Example
window._sp_queue = [];
window._sp_ = {
    config: {
        accountId: 1584,
        baseEndpoint: 'https://cdn.privacy-mgmt.com',
        ccpa: { },
        gdpr: { },
        propertyHref: 'https://www.testdemo.com',
        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
window._sp_.executeMessaging();

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

Comments

0 comments

Article is closed for comments.