Skip to content
English
  • There are no suggestions because the search field is empty.

relevantDigital.destroySlots()

Function to be used in Single Page Applications (SPA) when navigating between content

The destroySlots() function is designed to be used on SPA pages (React, etc) - in between page views. It will reset some internal state in the Relevant Yield script and reset ad slots in the ad server. The latter includes:

Example

// No need to use relevantDigital.cmd.push()
// as we only need to call the function
// If the library is indeed initialized.

if(window.relevantDigital && relevantDigital.destroySlots) {
relevantDigital.destroySlots();
}