Skip to content

Commit

Permalink
Update creative.html
Browse files Browse the repository at this point in the history
Updating for the new safe frame issue discovered, see prebid/prebid-universal-creative#64 for more details!
  • Loading branch information
robertrmartinez authored Jun 28, 2019
1 parent cec25d5 commit 38eaee8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion integrationExamples/gpt/x-domain/creative.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// this script can be returned by an ad server delivering a cross domain iframe, into which the
// creative will be rendered, e.g. DFP delivering a SafeFrame

let windowLocation = window.location;
var urlParser = document.createElement('a');
urlParser.href = '%%PATTERN:url%%';
var publisherDomain = urlParser.protocol + '//' + urlParser.hostname;
var adServerDomain = urlParser.protocol + '//tpc.googlesyndication.com';
var adServerDomain = windowLocation.protocol + '//tpc.googlesyndication.com';

function renderAd(ev) {
var key = ev.message ? 'message' : 'data';
Expand Down

0 comments on commit 38eaee8

Please sign in to comment.