From 80814ac54b03331153fcf2173c807afa3e425ac4 Mon Sep 17 00:00:00 2001 From: Alain Cajuste Date: Mon, 17 Apr 2023 09:45:36 +0200 Subject: [PATCH] Bidwatch Analytics Adapter: add of the referer for bid won --- modules/bidwatchAnalyticsAdapter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/bidwatchAnalyticsAdapter.js b/modules/bidwatchAnalyticsAdapter.js index 0908b02de2e..b6cfa54170c 100644 --- a/modules/bidwatchAnalyticsAdapter.js +++ b/modules/bidwatchAnalyticsAdapter.js @@ -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'; @@ -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}); }