Skip to content

Instantly share code, notes, and snippets.

@codeorelse
Created January 28, 2019 16:58
Show Gist options
  • Save codeorelse/54bcabc15ef95c0ee6a0236dc50c7133 to your computer and use it in GitHub Desktop.
Save codeorelse/54bcabc15ef95c0ee6a0236dc50c7133 to your computer and use it in GitHub Desktop.
window.addEventListener('message', (e) => {
if (e.data && e.data.type === 'GET_MIAB_CONFIG') {
var meh_seq_research_config = {
auctionId: '${AUCTION_ID}',
creativeSize: '${CREATIVE_SIZE}',
creativeId: '${CREATIVE_ID}',
cookieName: 'stl_ojt18_prospecting',
supplyType: '${SUPPLY_TYPE}',
seller: '${SELLER_MEMBER_ID}',
placementId: '${TAG_ID}',
hourOfDay: new Date().getHours(),
dayOfTheWeek: new Date().getDay(),
maxFrequencyCap: 15,
};
e.source.postMessage({ type: 'SET_MIAB_CONFIG', meh_seq_research_config: meh_seq_research_config }, '*');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment