From aba368948b4e225fd3b0f4e3c9bc20c3c34c0a03 Mon Sep 17 00:00:00 2001 From: adxcgcom <31470944+adxcgcom@users.noreply.github.com> Date: Wed, 4 Dec 2019 15:20:15 +0000 Subject: [PATCH] adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility (#4515) * adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility * CI restart * CI restart * Updated docs --- modules/adxcgAnalyticsAdapter.js | 14 ++++++++------ modules/adxcgAnalyticsAdapter.md | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/adxcgAnalyticsAdapter.js b/modules/adxcgAnalyticsAdapter.js index 0aa6df3d03d..58792cf2675 100644 --- a/modules/adxcgAnalyticsAdapter.js +++ b/modules/adxcgAnalyticsAdapter.js @@ -5,6 +5,12 @@ import CONSTANTS from '../src/constants.json'; import * as url from '../src/url'; import * as utils from '../src/utils'; +/** + * Analytics adapter from adxcg.com + * maintainer info@adxcg.com + * updated 201911 for prebid 3.0 + */ + const emptyUrl = ''; const analyticsType = 'endpoint'; const adxcgAnalyticsVersion = 'v2.01'; @@ -107,11 +113,8 @@ function mapBidWon (bidResponse) { } function send (data) { - let location = utils.getTopWindowLocation(); - let secure = location.protocol === 'https:'; - let adxcgAnalyticsRequestUrl = url.format({ - protocol: secure ? 'https' : 'http', + protocol: 'https', hostname: adxcgAnalyticsAdapter.context.host, pathname: '/pbrx/v2', search: { @@ -145,14 +148,13 @@ adxcgAnalyticsAdapter.enableAnalytics = function (config) { return; } - let secure = location.protocol === 'https:'; adxcgAnalyticsAdapter.context = { events: { bidRequests: [], bidResponses: [] }, initOptions: config.options, - host: config.options.host || (secure ? 'hbarxs.adxcg.net' : 'hbarx.adxcg.net') + host: config.options.host || ('hbarxs.adxcg.net') }; adxcgAnalyticsAdapter.originEnableAnalytics(config); diff --git a/modules/adxcgAnalyticsAdapter.md b/modules/adxcgAnalyticsAdapter.md index e134ed23e3f..5b47ca856c5 100644 --- a/modules/adxcgAnalyticsAdapter.md +++ b/modules/adxcgAnalyticsAdapter.md @@ -16,7 +16,7 @@ https://www.adxcg.com/ { provider: 'adxcg', options : { - publisherId: ["42"] + publisherId: "42" } }