codeorelse
1/28/2019 - 4:58 PM

STL feb18

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 }, '*');
  }
});