relevantDigital.getInstance()

getInstance() returns the internal root object of the Relevant Yield environment.

WARNING: Please only use the fields listed below, as other fields and methods might change/disappear without prior notice.

Supported fields

  • siteData - The Generic site data object for the site. The content depends on the settings in Generic site data set in Prebid parameters for the site.
  • pbjs - The global pbjs-variable used by Yield. Use this instead of windows.pbjs if you want the possibility to change the global pbjs-variable name in the prebid build to something else later, without having to update your code.

Example

window.relevantDigital = window.relevantDigital || {};
relevantDigital.cmd = relevantDigital.cmd || [];
relevantDigital.cmd.push(() => {
const { siteData } = relevantDigital.getInstance();
console.info('Some setting:', siteData.someCustomSetting);
});