-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility (#4515)
* adxcgAnalyticsAdapter.js prebid 3.0 requirements compatibility * CI restart * CI restart * Updated docs
- Loading branch information
1 parent
32aef56
commit aba3689
Showing
2 changed files
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [email protected] | ||
* 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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ https://www.adxcg.com/ | |
{ | ||
provider: 'adxcg', | ||
options : { | ||
publisherId: ["42"] | ||
publisherId: "42" | ||
} | ||
} | ||
|