relevantDigital.destroySlots()
Reset Relevant Yield and ad-server slots between views in single-page applications.
Use relevantDigital.destroySlots() between page views in a single-page application, such as React.
The function resets Relevant Yield internal state and ad-server slots.
Ad-server behavior
Google Ad Manager calls googletag.destroySlots().
Xandr calls apntag.clearRequests().
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();
}Last updated
Was this helpful?