diff --git a/modules/inskinBidAdapter.js b/modules/inskinBidAdapter.js index 781bca90660..6f0023498aa 100644 --- a/modules/inskinBidAdapter.js +++ b/modules/inskinBidAdapter.js @@ -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'; @@ -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); }); } diff --git a/src/adloader.js b/src/adloader.js index 0b70686842d..17a536ad9dc 100644 --- a/src/adloader.js +++ b/src/adloader.js @@ -12,7 +12,8 @@ const _approvedLoadExternalJSList = [ 'brandmetrics', 'justtag', 'akamaidap', - 'ftrackId' + 'ftrackId', + 'inskin' ] /**