Skip to content

Commit

Permalink
Bidwatch Analytics Adapter: add of the referer for bid won (#9818)
Browse files Browse the repository at this point in the history
  • Loading branch information
alaincajuste-msq committed Apr 19, 2023
1 parent b8c1c95 commit 343fa89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/bidwatchAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import adapter from '../libraries/analyticsAdapter/AnalyticsAdapter.js';
import adapterManager from '../src/adapterManager.js';
import CONSTANTS from '../src/constants.json';
import { ajax } from '../src/ajax.js';
import { getRefererInfo } from '../src/refererDetection.js';

const analyticsType = 'endpoint';
const url = 'URL_TO_SERVER_ENDPOINT';
Expand Down Expand Up @@ -145,6 +146,7 @@ function handleBidWon(args) {
});
}
args['cpmIncrement'] = increment;
args['referer'] = encodeURIComponent(getRefererInfo().page || getRefererInfo().topmostLocation);
if (typeof saveEvents.bidRequested == 'object' && saveEvents.bidRequested.length > 0 && saveEvents.bidRequested[0].gdprConsent) { args.gdpr = saveEvents.bidRequested[0].gdprConsent; }
ajax(endpoint + '.bidwatch.io/analytics/bid_won', null, JSON.stringify(args), {method: 'POST', withCredentials: true});
}
Expand Down

0 comments on commit 343fa89

Please sign in to comment.