For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

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?