relevantDigital.addAmazonConfig()

relevantDigital.addAmazonConfig() MUST be used instead of manually using apstag.init() in Amazon

The apstag.init() function for configuring Amazon UAM/TAM will be called once by our library immediately before triggering the first auction with placements where Amazon is enabled. The addAmazonConfig() function adds the provided settings into the configuration object that will be supplied in that call. Please follow the following rules:

  • Don't call apstag.init() directly as that might cause unexpected behavior.
  • Make sure to call addAmazonConfig() before the first call to relevantDigital.loadPrebid() (or more specifically - before the first such call that involves placements that are using Amazon). If done at a later stage the call will have no effect. However it won't cause any harm to call it at a later stage either

Example

window.relevantDigital = window.relevantDigital || {};
relevantDigital.cmd = relevantDigital.cmd || [];
relevantDigital.cmd.push(function() {
relevantDigital.addAmazonConfig({ // merge some amazon config
params: { "SOME_KEY": "SOME_VALUE" },  
});
relevantDigital.loadPrebid({ ... }); // load some ads
})