Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inskin bid adapter: use loadExternalScript utility instead of appendC… #8490

Merged
merged 1 commit into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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