Skip to content

Commit

Permalink
Undertone Bid Adapter - update canonical and referral URLs 31599 (pre…
Browse files Browse the repository at this point in the history
…bid#7693)

* * Update undertone adapter - change parameters - placementId parameter is now optional and not mandatory - undertoneBidAdapter.js

* Updated undertone bid adapter tests accordingly - undertoneBidAdapter_spec.js

* * Update undertone adapter - change parameters - placementId parameter is now optional and not mandatory - undertoneBidAdapter.js

 * Updated undertone bid adapter tests accordingly - undertoneBidAdapter_spec.js

* fix lint issue in undertone adapter spec

* added user sync function to undertone adapter

* * Update undertone adapter - change parameters - placementId parameter is now optional and not mandatory - undertoneBidAdapter.js

* Updated undertone bid adapter tests accordingly - undertoneBidAdapter_spec.js

* added user sync function to undertone adapter

* added user sync function to undertone adapter

* revert package-lock.json

* added user sync function to undertone adapter

* Update undertoneBidAdapter.js

* Update browsers.json

* sending both page url & commons.referrer

* revert indentation

* sending both commons.canonicalUrl & commons.referrer

Co-authored-by: omerko <omer.koren@perion.com>
Co-authored-by: Omer Koren <omerko@users.noreply.github.com>
Co-authored-by: AnnaPerion <annat@perion.com>
Co-authored-by: Oran Hollaender <oran@perion.com>
Co-authored-by: tamirnPerion <44399211+tamirnPerion@users.noreply.github.com>
  • Loading branch information
6 people authored and Chris Pabst committed Jan 10, 2022
1 parent c2877ba commit d50ba51
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/undertoneBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,16 @@ export const spec = {
'commons': commons
};
const referer = bidderRequest.refererInfo.referer;
const canonicalUrl = getCanonicalUrl();
if (referer) {
commons.referrer = referer;
}
if (canonicalUrl) {
commons.canonicalUrl = canonicalUrl;
}
const hostname = parseUrl(referer).hostname;
let domain = extractDomainFromHost(hostname);
const pageUrl = getCanonicalUrl() || referer;
const pageUrl = canonicalUrl || referer;

const pubid = validBidRequests[0].params.publisherId;
let reqUrl = `${URL}?pid=${pubid}&domain=${domain}`;
Expand Down

0 comments on commit d50ba51

Please sign in to comment.