Skip to content

Commit

Permalink
craftBidder supports imRtdProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
crumbjp committed Nov 18, 2024
1 parent aa8fc32 commit b83f6b1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/craftBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ export const spec = {
if (bidRequest.userId) {
payload.userId = bidRequest.userId
}
if (storage.hasLocalStorage()) {
const imUidLocalName = '__im_uid';
payload.userId = payload.userId || {};
payload.userId.imuid = payload.userId.imuid || storage.getDataFromLocalStorage(imUidLocalName);
const imRtdLocalName = '__im_sids';
const sids = storage.getDataFromLocalStorage(imRtdLocalName);
const parsedSids = sids ? sids.split(',') : [];
payload.userId.imsids = parsedSids;
}
}
const request = formatRequest(payload, bidderRequest);
return request;
Expand Down

0 comments on commit b83f6b1

Please sign in to comment.