Skip to content

Commit

Permalink
Mediasquare Bid Adapter: add of the referer for onBidWon (prebid#9817)
Browse files Browse the repository at this point in the history
* Mediasquare Bid Adapter: add of the referer for onBidWon

* Mediasquare Bid Adapter: replay test
  • Loading branch information
alaincajuste-msq authored and jorgeluisrocha committed May 18, 2023
1 parent 4923af8 commit 92bb5d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/mediasquareBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
import { convertOrtbRequestToProprietaryNative } from '../src/native.js';
import {Renderer} from '../src/Renderer.js';
import { getRefererInfo } from '../src/refererDetection.js';

const BIDDER_CODE = 'mediasquare';
const BIDDER_URL_PROD = 'https://pbs-front.mediasquare.fr/'
Expand Down Expand Up @@ -170,7 +171,7 @@ export const spec = {
*/
onBidWon: function(bid) {
// fires a pixel to confirm a winning bid
let params = {'pbjs': '$prebid.version$'};
let params = { pbjs: '$prebid.version$', referer: encodeURIComponent(getRefererInfo().page || getRefererInfo().topmostLocation) };
let endpoint = document.location.search.match(/msq_test=true/) ? BIDDER_URL_TEST : BIDDER_URL_PROD;
let paramsToSearchFor = ['cpm', 'size', 'mediaType', 'currency', 'creativeId', 'adUnitCode', 'timeToRespond', 'requestId', 'auctionId', 'originalCpm', 'originalCurrency'];
if (bid.hasOwnProperty('mediasquare')) {
Expand Down

0 comments on commit 92bb5d9

Please sign in to comment.