Skip to content

Commit

Permalink
Inskin bid adapter: use loadExternalScript utility instead of appendC…
Browse files Browse the repository at this point in the history
…hild() to insert the ad tag (#8490)
  • Loading branch information
cciocov authored May 30, 2022
1 parent 783ec07 commit 5f2ed0f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions modules/inskinBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createTrackPixelHtml } from '../src/utils.js';
import { loadExternalScript } from '../src/adloader.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';

const BIDDER_CODE = 'inskin';
Expand Down Expand Up @@ -211,9 +212,9 @@ export const spec = {
bidPrice: bidsMap[e.data.bidId].price,
serverResponse
};
const script = document.createElement('script');
script.src = 'https://cdn.inskinad.com/isfe/publishercode/' + bidsMap[e.data.bidId].params.siteId + '/default.js?autoload&id=' + id;
document.getElementsByTagName('head')[0].appendChild(script);

const url = 'https://cdn.inskinad.com/isfe/publishercode/' + bidsMap[e.data.bidId].params.siteId + '/default.js?autoload&id=' + id;
loadExternalScript(url, BIDDER_CODE);
});
}

Expand Down
3 changes: 2 additions & 1 deletion src/adloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const _approvedLoadExternalJSList = [
'brandmetrics',
'justtag',
'akamaidap',
'ftrackId'
'ftrackId',
'inskin'
]

/**
Expand Down

0 comments on commit 5f2ed0f

Please sign in to comment.