02-21-2019, 08:36 AM
|
#106
|
Powerplay Quarterback
|
Never mind. Right after I posted the below, I did a couple more tests and the ad came back incorrect. I'll keep testing when I have time.
Spoilered as it does't work.
Spoiler!
Ok, did a bit of testing this morning. Could you remove the whole setSafeFrameConfig change (so that we are back to the original), then instead, comment out the enableSingleRequest line so we get:
Code:
googletag.defineSlot('/130049501/LeaderboardROS', [[728, 90], [970, 90]], 'div-gpt-ad-1461011238474-0').addService(googletag.pubads());
googletag.defineSlot('/130049501/ROSScraper', [[120, 600]], 'div-gpt-ad-1461011238474-1').addService(googletag.pubads());
//googletag.pubads().enableSingleRequest();
googletag.pubads().collapseEmptyDivs();
googletag.enableServices();
I sort of hacked this line out in my testing environment, and so far I've gotten 20 page refreshes in a row with the ad in the correct spot.
As far as I can tell, the enableSingleRequest() call will retrieve all of the ads in a single call. By commenting out the line, the two ads come back in two separate calls. So in theory, this shouldn't change anything except, maybe, a small change in performance. But like I said, making this change has solved the issue for me so far.
Last edited by psyang; 02-21-2019 at 08:39 AM.
|
|
|