Refresh
-
Does Adagio handle refresh for Prebid.js? Yes
-
Create a Refresh rule in the platform under the section “Inventory”
-
configure Adagio refresh on your side
To identify and track refresh calls, you have to configure your ad-server with special targeting keys below:

-
Will basic Adagio refresh work with GPT ?
Adagio can handle the whole process of refreshing a slot for GPT through Prebid.js.
Before the ad-request is done, the two Adagio Refresh specific targeting keys will be added to the slot.
-
Is it doable to run custom refresh ?
Yes, Adagio dispatches an event before refresh is done which can be used to provide a custom logic.
The
adagio.refresh.onBeforeRefreshis a cancellable event dispatched at the very beginning of the refresh process, if cancelled, the owner Adagio code is not executed and the site owner is responsible of the call ofpbjs.requestBids()to start a new bid./*** @param e Custom event* e.detail custom event detail object.* - adUnitCode: adUnit code as defined in the Prebid.js config* - adUnitElementId: id attribute of html element where the ad-unit is bound* - refreshConfig: refresh config for the current ad-unit* - currentPrintNumber: current print number*/const onBeforeRefreshEvent = function(e) {e.preventDefault(); // Call this function to prevent Adagio from starting an auction.try {// Write here your custom code, like starting an auction by calling pbjs.requestBids().// The Code below is here for example purpose only// Get current slot to refresh and add Custom targeting keysconst slots = googletag.pubads().getSlots();const slot = slots.filter(s => s.getSlotElementId() === e.detail.adUnitElementId)[0];if (!slot) {return;}slot.setTargeting('adg_refresh', 'true');slot.setTargeting('adg_pn', e.detail.currentPrintNumber + 1);// Call prebid.js requestBids()pbjs.requestBids({adUnits: [{// adUnitCode config}],bidsBackHandler: function() {window.top.googletag.pubads().refresh([slot]);}});} catch (err) {console.log(err);}};window.top.document.addEventListener('adagio.refresh.onBeforeRefresh', onBeforeRefreshEvent); -
I don’t want to refresh some specific adunits, is there a way to do that?
Yes, doNotRefresh allows the publisher to manage refresh exclusions by ad-units, on the current page. For example, a road-block campaign needs the use of doNotRefresh.
The configuration aims to define the
doNotRefreshproperty on the globalwindow.top.ADAGIOobject. the configuration is mainly done from the ad-server when setting up a “creative” by adding the following JS code:try {window.top.ADAGIO.doNotRefresh = window.top.ADAGIO.doNotRefresh || []window.top.ADAGIO.doNotRefresh.push('adunit_code')} catch(e) {}
