Skip to content

Commit 55b88cc

Browse files
add timings
1 parent 5fcfd79 commit 55b88cc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

modules/rubiconAnalyticsAdapter.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ const COOKIE_NAME = 'rpaSession';
1313
const LAST_SEEN_EXPIRE_TIME = 1800000; // 30 mins
1414
const END_EXPIRE_TIME = 21600000; // 6 hours
1515

16+
const MODULE_INITIALIZED_TIME = utils.getPerformanceNow();
17+
1618
const pbsErrorMap = {
1719
1: 'timeout-error',
1820
2: 'input-error',
@@ -302,10 +304,12 @@ function sendMessage(auctionId, bidWonId, trigger) {
302304
message.bidsWon = bidsWon;
303305
}
304306

305-
message.eventTiming = Math.round(utils.getPerformanceNow() - auctionCache.endTs);
307+
message.timeAfterLoad = Math.round(utils.getPerformanceNow() - MODULE_INITIALIZED_TIME);
308+
message.timeAfterAuctionEnd = Math.round(utils.getPerformanceNow() - auctionCache.endTs);
306309
auctionCache.sent = true;
307310
} else if (bidWonId && auctionCache && auctionCache.bids[bidWonId]) {
308-
message.eventTiming = Math.round(utils.getPerformanceNow() - auctionCache.endTs);
311+
message.timeAfterLoad = Math.round(utils.getPerformanceNow() - MODULE_INITIALIZED_TIME);
312+
message.timeAfterAuctionEnd = Math.round(utils.getPerformanceNow() - auctionCache.endTs);
309313
message.bidsWon = [
310314
formatBidWon(auctionCache.bids[bidWonId])
311315
];

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "prebid.js",
3-
"version": "4.33.0",
3+
"version": "4.33.2",
44
"description": "Header Bidding Management Library",
55
"main": "src/prebid.js",
66
"scripts": {

0 commit comments

Comments
 (0)