From 41d1d5db7f2e57a1048d6a5cbb7aa17db35ba188 Mon Sep 17 00:00:00 2001 From: Harshad Mane Date: Mon, 2 Dec 2019 12:29:35 -0800 Subject: [PATCH] PubMatic adapter avoiding deprecated utils APIs (#4521) * added support for pubcommon, digitrust, id5id * added support for IdentityLink * changed the source for id5 * added unit test cases * changed source param for identityLink * stoped using getTopWindowUrl * removed extra white space --- modules/pubmaticBidAdapter.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/pubmaticBidAdapter.js b/modules/pubmaticBidAdapter.js index dc22b9c57ae..b5da88641fd 100644 --- a/modules/pubmaticBidAdapter.js +++ b/modules/pubmaticBidAdapter.js @@ -198,14 +198,10 @@ function _parseAdSlot(bid) { } function _initConf(refererInfo) { - var conf = {}; - conf.pageURL = utils.getTopWindowUrl(); - if (refererInfo && refererInfo.referer) { - conf.refURL = refererInfo.referer; - } else { - conf.refURL = ''; - } - return conf; + return { + pageURL: (refererInfo && refererInfo.referer) ? refererInfo.referer : window.location.href, + refURL: window.document.referrer + }; } function _handleCustomParams(params, conf) {