When integrated with a CMP, such as Sourcepoint, the header bidding scripts for Prebid may need the presence of a "shim" file to ensure that all the CMP objects that the script leverages are instantiated prior to the CMP code being fully loaded.
Sourcepoint provides a shim file that is inlined as a script tag prior to the loading of the
prebid.js file. The code snippet below shows the placement of the shim file on an example example site.
<script src='//d2zv5rkii46miq.cloudfront.net/0/latest/cmp_shim.js'></script> <script src='//somesite.com/prebid/prebid20180829.js'></script>
Within Prebid there is the option to have the
prebid.js script wait until the user has provided consent. In these cases, publishers may need to wait for any callback functions passed using
__cmp(‘getConsentData’, null, callback); to wait until the user has consented until the callback is fired. When this is implemented, Sourcepoint also provides a flag that will ensure that this happens. The flag is:
window._sp_.config.cmp.waitForConsentData = true;
Below is an example of the flag within the Sourcepoint configuration.
Note: Please contact your Sourcepoint account manager with any questions you may have.