Skip to content

Commit 3fa0392

Browse files
adxcgcomafewcc
authored andcommitted
adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility (prebid#4515)
* adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility * CI restart * CI restart * Updated docs
1 parent 25dea00 commit 3fa0392

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

modules/adxcgAnalyticsAdapter.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import CONSTANTS from '../src/constants.json';
55
import * as url from '../src/url';
66
import * as utils from '../src/utils';
77

8+
/**
9+
* Analytics adapter from adxcg.com
10+
* maintainer [email protected]
11+
* updated 201911 for prebid 3.0
12+
*/
13+
814
const emptyUrl = '';
915
const analyticsType = 'endpoint';
1016
const adxcgAnalyticsVersion = 'v2.01';
@@ -107,11 +113,8 @@ function mapBidWon (bidResponse) {
107113
}
108114

109115
function send (data) {
110-
let location = utils.getTopWindowLocation();
111-
let secure = location.protocol === 'https:';
112-
113116
let adxcgAnalyticsRequestUrl = url.format({
114-
protocol: secure ? 'https' : 'http',
117+
protocol: 'https',
115118
hostname: adxcgAnalyticsAdapter.context.host,
116119
pathname: '/pbrx/v2',
117120
search: {
@@ -145,14 +148,13 @@ adxcgAnalyticsAdapter.enableAnalytics = function (config) {
145148
return;
146149
}
147150

148-
let secure = location.protocol === 'https:';
149151
adxcgAnalyticsAdapter.context = {
150152
events: {
151153
bidRequests: [],
152154
bidResponses: []
153155
},
154156
initOptions: config.options,
155-
host: config.options.host || (secure ? 'hbarxs.adxcg.net' : 'hbarx.adxcg.net')
157+
host: config.options.host || ('hbarxs.adxcg.net')
156158
};
157159

158160
adxcgAnalyticsAdapter.originEnableAnalytics(config);

modules/adxcgAnalyticsAdapter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ https://www.adxcg.com/
1616
{
1717
provider: 'adxcg',
1818
options : {
19-
publisherId: ["42"]
19+
publisherId: "42"
2020
}
2121
}
2222

0 commit comments

Comments
 (0)