Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set bid response ID to bid request ID for triplelift. #541

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5e52274
Facebook Audience Network adapter (#483)
johngeorgewright Aug 8, 2016
ff3c2f0
Add UnderdogMedia Adatper (#491)
baragona Aug 9, 2016
80d89d7
Add UT endpoint adapter (#507)
matthewlane Aug 12, 2016
f6ba404
getLoadTimeDistribution-sorting-fix (#510)
CLKeenan Aug 12, 2016
21528be
prevent externalOneTimeCallback from being called more than once (#505)
snapwich Aug 12, 2016
e5b9b35
Save winning bid (#480)
d6u Aug 12, 2016
d047f07
Exclude polyfill.js from code coverage (#522)
Aug 12, 2016
6bd07b5
489 timeout not tracked (#500)
therazor Aug 12, 2016
52c1be1
Pass keywords parameter to bid request (#524)
matthewlane Aug 13, 2016
73ffdc5
Set bid response ID to bid request ID (#526)
matthewlane Aug 16, 2016
ce2f08d
Remove unused imports from underdogmedia spec. (#530)
nanek Aug 17, 2016
25e15bb
Queue bid requests (#477)
Aug 17, 2016
dd1af59
Use cross-browser parseInt function (#536)
matthewlane Aug 17, 2016
2bead0c
Rubicon project fix remove ad unit iteration (#535)
Aug 17, 2016
f9045cc
bid responses have adId so remove matching to request on best effort …
Aug 17, 2016
edea78e
#494 fix. AUCTION_END event was getting emitted in multiple scenarios…
jaiminpanchal27 Aug 17, 2016
4d5a5d5
Memeglobal prebid (#504)
naamushka Aug 17, 2016
e7eb5f4
Add tests for aardvark adapter. (#529)
nanek Aug 17, 2016
bcc3356
allows multiple bids to be registered per a slot, related to #496 (#503)
snapwich Aug 17, 2016
b71006e
Add tests for triplelift adapter. (#531)
nanek Aug 17, 2016
e1cf92b
Prebid 0.12.0 release
Aug 17, 2016
07893cb
Set bid response ID to bid request ID for triplelift.
nanek Aug 19, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ test/app
gpt.html
gpt-each-bidder3.html

# Selenium files
bin
selenium*.log

# Dev File

integrationExamples/gpt/gpt.html
Expand Down
4 changes: 4 additions & 0 deletions adapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"admedia",
"aol",
"appnexus",
"appnexusAst",
"fan",
"indexExchange",
"kruxlink",
"openx",
Expand All @@ -21,6 +23,8 @@
"brightcom",
"wideorbit",
"jcm",
"underdogmedia",
"memeglobal",
{
"appnexus": {
"alias": "brealtime"
Expand Down
14 changes: 13 additions & 1 deletion integrationExamples/gpt/pbjs_example_gpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,13 @@
spaceId: 14071, // REQUIRED int. To get one, contact http://www.sekindo.com
bidfloor: 0.2 // OPTIONAL float bid floor in $ CPM
}
}
},
{
bidder: 'memeglobal',
params: {
tagid: 007, // REQUIRED int. To get one, contact http://www.memeglobal.com
}
}
]
}, {
code: 'div-gpt-ad-12345678-1',
Expand Down Expand Up @@ -282,6 +288,12 @@
pbId: 123, // REQUIRED Publisher Id,
pId: 123456 // REQUIRED Placement Id
}
},
{
bidder: 'memeglobal',
params: {
tagid: 007, // REQUIRED int. To get one, contact http://www.memeglobal.com
}
}
]
}
Expand Down
5 changes: 5 additions & 0 deletions integrationExamples/gpt/pbjs_partial_refresh_gpt.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@
publisherId: 'TO ADD',
adSlot: 'TO ADD@300x600'
}
}, {
bidder: 'fan',
params: {
placementId: 'TO ADD'
}
}
]
}, {
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var webpackConfig = require('./webpack.conf');
webpackConfig.module.postLoaders = [
{
test: /\.js$/,
exclude: /(node_modules)|(test)|(integrationExamples)|(build)/,
exclude: /(node_modules)|(test)|(integrationExamples)|(build)|polyfill.js/,
loader: 'istanbul-instrumenter'
}
];
Expand Down
11 changes: 3 additions & 8 deletions loaders/adapterLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,8 @@ function insertAdapters() {
}

return inserts.map(name => {
if (name === 'appnexusAst') {
return `import { AppnexusAst } from './adapters/appnexusAst';
exports.registerBidAdapter(new AppnexusAst('appnexus'), 'appnexus');\n`;
} else {
return `var ${adapterName(name)} = require('./adapters/${name}.js');
exports.registerBidAdapter(new ${adapterName(name)}${useCreateNew(name)}(), '${name}');\n`;
}
return `var ${adapterName(name)} = require('./adapters/${name}.js');
exports.registerBidAdapter(new ${adapterName(name)}${useCreateNew(name)}(), '${name}');\n`;
})
.concat(aliases.map(adapter => {
const name = Object.keys(adapter)[0];
Expand All @@ -80,7 +75,7 @@ function adapterName(adapter) {
* @returns {string}
*/
function useCreateNew(adapter) {
return adapter === 'appnexus' ? '.createNew' : '';
return ['appnexus', 'appnexusAst'].includes(adapter) ? '.createNew' : '';
}

/**
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": "prebid.js",
"version": "0.12.0-pre",
"version": "0.12.0",
"description": "Header Bidding Management Library",
"main": "src/prebid.js",
"scripts": {
Expand Down
35 changes: 15 additions & 20 deletions src/adapters/analytics/ga.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ var _enableCheck = true;
var _category = 'Prebid.js Bids';
var _eventCount = 0;
var _enableDistribution = false;
var _timedOutBidders = [];
var _trackerSend = null;

/**
Expand Down Expand Up @@ -56,7 +55,8 @@ exports.enableAnalytics = function ({ provider, options }) {
sendBidResponseToGa(bid);

} else if (eventObj.eventType === BID_TIMEOUT) {
_timedOutBidders = args.bidderCode;
const bidderArray = args;
sendBidTimeouts(bidderArray);
} else if (eventObj.eventType === BID_WON) {
bid = args;
sendBidWonToGa(bid);
Expand All @@ -73,12 +73,11 @@ exports.enableAnalytics = function ({ provider, options }) {
//bidResponses
events.on(BID_RESPONSE, function (bid) {
sendBidResponseToGa(bid);
sendBidTimeouts(bid);
});

//bidTimeouts
events.on(BID_TIMEOUT, function (bidderArray) {
_timedOutBidders = bidderArray;
sendBidTimeouts(bidderArray);
});

//wins
Expand Down Expand Up @@ -131,17 +130,17 @@ function getLoadTimeDistribution(time) {
if (time >= 0 && time < 200) {
distribution = '0-200ms';
} else if (time >= 200 && time < 300) {
distribution = '200-300ms';
distribution = '0200-300ms';
} else if (time >= 300 && time < 400) {
distribution = '300-400ms';
distribution = '0300-400ms';
} else if (time >= 400 && time < 500) {
distribution = '400-500ms';
distribution = '0400-500ms';
} else if (time >= 500 && time < 600) {
distribution = '500-600ms';
distribution = '0500-600ms';
} else if (time >= 600 && time < 800) {
distribution = '600-800ms';
distribution = '0600-800ms';
} else if (time >= 800 && time < 1000) {
distribution = '800-1000ms';
distribution = '0800-1000ms';
} else if (time >= 1000 && time < 1200) {
distribution = '1000-1200ms';
} else if (time >= 1200 && time < 1500) {
Expand Down Expand Up @@ -224,18 +223,14 @@ function sendBidResponseToGa(bid) {
checkAnalytics();
}

function sendBidTimeouts(bid) {
function sendBidTimeouts(timedOutBidders) {

if (bid && bid.bidder) {
_analyticsQueue.push(function () {
utils._each(_timedOutBidders, function (bidderCode) {
if (bid.bidder === bidderCode) {
_eventCount++;
window[_gaGlobal](_trackerSend, 'event', _category, 'Timeouts', bidderCode, bid.timeToRespond, _disableInteraction);
}
});
_analyticsQueue.push(function () {
utils._each(timedOutBidders, function (bidderCode) {
_eventCount++;
window[_gaGlobal](_trackerSend, 'event', _category, 'Timeouts', bidderCode, _disableInteraction);
});
}
});

checkAnalytics();
}
Expand Down
Loading