Single Page Application Functions

When implementing either of Sourcepoint's GDPR messaging solutions (TCF v2 or non-TCF) on a single page application, you should include the isSPA parameter in your client configuration script and set the value to true.

window._sp_ = {
config: {
accountId: 1234,
baseEndpoint: "",
isSPA : true

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




Trigger the window._sp_.executeMessaging() function in order to show a message on a single page application.

A message will only show when this function is triggered and should be called on each (virtual) pageload.


Trigger the window._sp_.destroyMessages() function to dismiss all messages.