Skip to content
This repository has been archived by the owner on Feb 13, 2021. It is now read-only.

Commit

Permalink
Merge pull request #14 in AOLP_ADS_JS/prebid.js from bug/initial-laun…
Browse files Browse the repository at this point in the history
…ch-fixes to master

* commit '98636cb2b6f87506fb6627deb42b1270252eda21':
  Bumped RC version, CHANGELOG
  Fixed support for undefined options in AOL analytics
  Fixed error in AOL adapter when processing cpm from bid response
  • Loading branch information
marian-r committed Aug 23, 2016
2 parents 0e1fe2a + 98636cb commit 7ac2654
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
AOL Prebid 1.0.2
----------------
BUGFIX: Fixed error in AOL adapter when processing cpm from bid response.
BUGFIX: Support for undefined options in AOL analytics.


AOL Prebid 1.0.1
----------------
BUGFIX: Fixed pubapi parameter in AOL analytics.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aol-container-tag",
"version": "1.0.1",
"version": "1.0.2-rc1",
"description": "AOL Header Bidding Container Tag Library",
"main": "src/prebid.js",
"scripts": {
Expand Down
6 changes: 5 additions & 1 deletion src/adapters/analytics/aol.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default utils.extend(adapter({
analyticsType
}), {

enableAnalytics({ options }) {
enableAnalytics({
options = {
server: null // Internal use only. Use 'region' config option for AOL adapter.
}
}) {
this.server = options.server;

//first send all events fired before enableAnalytics called
Expand Down
9 changes: 8 additions & 1 deletion src/adapters/aol.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ var AolAdapter = function AolAdapter() {
return;
}

var encp = response.data.seatbid[0].bid[0].ext.encp;
var encp;

try {
encp = response.data.seatbid[0].bid[0].ext.encp;
} catch(e) {
encp = null;
}

if (encp) {
cpm = encp;
} else {
Expand Down

0 comments on commit 7ac2654

Please sign in to comment.