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

Livewrapper Analytics Adapter: prioritize reporting Livewrapped floor data #7554

Merged
merged 70 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1beaa7c
Livewrapped bid and analytics adapter
bjorn-lw Sep 25, 2018
250fca3
Merge remote-tracking branch 'upstream/master'
bjorn-lw Oct 4, 2018
c47dd60
Fixed some tests for browser compatibility
bjorn-lw Oct 4, 2018
5c0a354
Fixed some tests for browser compatibility
bjorn-lw Oct 4, 2018
f02ada1
Changed analytics adapter code name
bjorn-lw Oct 5, 2018
b2f72e1
Merge remote-tracking branch 'upstream/master'
bjorn-lw Oct 5, 2018
4792245
Fix double quote in debug message
bjorn-lw Oct 9, 2018
02a6e5a
modified how gdpr is being passed
bjorn-lw Nov 2, 2018
a26936a
Merge remote-tracking branch 'upstream/master'
bjorn-lw Nov 2, 2018
e799957
Merge remote-tracking branch 'upstream/master'
bjorn-lw Jan 16, 2019
176ea08
Added support for Publisher Common ID Module
bjorn-lw Jan 17, 2019
e20d9e7
Merge remote-tracking branch 'upstream/master'
bjorn-lw Jan 17, 2019
5f1951a
Corrections for ttr in analytics
bjorn-lw Feb 18, 2019
efe678c
Merge remote-tracking branch 'upstream/master'
bjorn-lw Feb 18, 2019
e959425
ANalytics updates
bjorn-lw Feb 18, 2019
43f2f07
Auction start time stamp changed
bjorn-lw Feb 22, 2019
18bfbbf
Merge remote-tracking branch 'upstream/master'
bjorn-lw Apr 11, 2019
87ebc8b
Detect recovered ad blocked requests
bjorn-lw Apr 15, 2019
f5f1e64
Merge branch 'master' of https://github.com/prebid/Prebid.js
bjorn-lw Aug 16, 2019
332b500
Collect info on ad units receiving any valid bid
bjorn-lw Aug 16, 2019
bda0fff
Merge branch 'master' of https://github.com/prebid/Prebid.js
bjorn-lw Oct 1, 2019
5f09e2a
Support for ID5
bjorn-lw Oct 22, 2019
728be38
Typo in test + eids on wrong level
bjorn-lw Oct 22, 2019
55d4448
Merge remote-tracking branch 'upstream/master'
bjorn-lw Dec 3, 2019
26c35ad
Merge remote-tracking branch 'upstream/master'
bjorn-lw Dec 12, 2019
531365e
Fix for Prebid 3.0
bjorn-lw Dec 12, 2019
6603c59
Fix get referer
bjorn-lw Dec 12, 2019
0ea76e4
http -> https in tests
bjorn-lw Dec 18, 2019
aa1a01d
Native support
bjorn-lw Dec 22, 2019
80b1079
Read sizes from mediatype.banner
bjorn-lw Jan 20, 2020
2114e29
Merge remote-tracking branch 'upstream/master'
bjorn-lw Jan 20, 2020
4c2db42
Revert accidental commit
bjorn-lw Jan 20, 2020
59c9ed2
Merge remote-tracking branch 'upstream/master'
bjorn-lw Jan 27, 2020
52903d5
Support native data collection + minor refactorings
bjorn-lw Jan 31, 2020
7bf4d26
Set analytics endpoint
bjorn-lw Feb 1, 2020
06cba0f
Support for app parameters
bjorn-lw Apr 7, 2020
2cdd237
Merge remote-tracking branch 'upstream/master'
bjorn-lw Apr 7, 2020
a9f204c
Fix issue where adunits with bids were not counted on reload
bjorn-lw Apr 7, 2020
559624d
Merge remote-tracking branch 'upstream/master'
bjorn-lw Apr 21, 2020
8171a22
Send debug info from adapter to external debugger
bjorn-lw Apr 22, 2020
0ea9dcd
Merge remote-tracking branch 'upstream/master'
bjorn-lw May 6, 2020
00b7642
Merge remote-tracking branch 'upstream/master'
bjorn-lw May 19, 2020
ef490e1
SChain support
bjorn-lw May 20, 2020
9db844d
Merge remote-tracking branch 'upstream/master'
bjorn-lw Aug 21, 2020
e951ade
Send GDPR data in analytics request
bjorn-lw Aug 23, 2020
9aef6d5
Merge remote-tracking branch 'upstream/master'
bjorn-lw Sep 10, 2020
251fe18
Merge branch 'master' of https://github.com/prebid/Prebid.js
bjorn-lw Sep 10, 2020
048679e
video support
bjorn-lw Sep 10, 2020
6ca9d8b
Merge remote-tracking branch 'upstream/master'
bjorn-lw Oct 19, 2020
00ed738
Report back floor via analytic
bjorn-lw Nov 3, 2020
05443df
Send auction id and adunit/bidder connection id
bjorn-lw Nov 16, 2020
3e2cd4e
Merge remote-tracking branch 'upstream/master'
bjorn-lw Nov 16, 2020
8fa0886
Criteo id support
bjorn-lw Nov 19, 2020
a283dde
Updated example
bjorn-lw Nov 30, 2020
d50fe13
livewrapped Analytics Adapter info file
bjorn-lw Nov 30, 2020
b2d551b
Merge remote-tracking branch 'upstream/master'
bjorn-lw Dec 7, 2020
893e6f3
Merge remote-tracking branch 'upstream/master'
bjorn-lw Jan 18, 2021
7afcadc
Livewrapped gvlid
bjorn-lw Jan 21, 2021
288ab08
Merge remote-tracking branch 'upstream/master'
bjorn-lw Feb 24, 2021
2f73e8c
Merge remote-tracking branch 'upstream/master'
bjorn-lw Mar 2, 2021
35e4954
Merge remote-tracking branch 'upstream/master'
bjorn-lw Mar 18, 2021
354f08d
Merge branch 'prebid:master' into master
bjorn-lw Jun 2, 2021
7beccf2
Pass parameter from wrapper
bjorn-lw Jun 6, 2021
f838500
Merge branch 'prebid:master' into master
bjorn-lw Sep 21, 2021
ee77c36
Read data-adunitid attribute on ad container if it exists and pass to…
bjorn-lw Sep 23, 2021
ae4a8f4
Merge branch 'prebid:master' into master
bjorn-lw Sep 23, 2021
ea5d103
Fix null check
bjorn-lw Sep 23, 2021
b419a10
Merge branch 'master' of https://github.com/Livewrapped-official/Preb…
bjorn-lw Sep 23, 2021
aa5eca0
Merge branch 'prebid:master' into master
bjorn-lw Oct 10, 2021
46b5b64
Prioritize Livewrapped floors information over floor price module flo…
bjorn-lw Oct 10, 2021
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
6 changes: 4 additions & 2 deletions modules/livewrappedAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ let livewrappedAnalyticsAdapter = Object.assign(adapter({EMPTYURL, ANALYTICSTYPE
bidResponse.ttr = args.timeToRespond;
bidResponse.readyToSend = 1;
bidResponse.mediaType = args.mediaType == 'native' ? 2 : (args.mediaType == 'video' ? 4 : 1);
bidResponse.floorData = args.floorData;
if (!bidResponse.ttr) {
bidResponse.ttr = time - bidResponse.start;
}
Expand Down Expand Up @@ -108,6 +109,7 @@ let livewrappedAnalyticsAdapter = Object.assign(adapter({EMPTYURL, ANALYTICSTYPE
logInfo('LIVEWRAPPED_BID_WON:', args);
let wonBid = cache.auctions[args.auctionId].bids[args.requestId];
wonBid.won = true;
wonBid.floorData = args.floorData;
if (wonBid.sendStatus != 0) {
livewrappedAnalyticsAdapter.sendEvents();
}
Expand Down Expand Up @@ -226,7 +228,7 @@ function getResponses(gdpr, auctionIds) {
IsBid: bid.isBid,
mediaType: bid.mediaType,
gdpr: gdprPos,
floor: bid.floorData ? bid.floorData.floorValue : bid.lwFloor,
floor: bid.lwFloor ? bid.lwFloor : (bid.floorData ? bid.floorData.floorValue : undefined),
floorCur: bid.floorData ? bid.floorData.floorCurrency : undefined,
auctionId: auctionIdPos,
auc: bid.auc,
Expand Down Expand Up @@ -263,7 +265,7 @@ function getWins(gdpr, auctionIds) {
cpm: bid.cpm,
mediaType: bid.mediaType,
gdpr: gdprPos,
floor: bid.floorData ? bid.floorData.floorValue : bid.lwFloor,
floor: bid.lwFloor ? bid.lwFloor : (bid.floorData ? bid.floorData.floorValue : undefined),
floorCur: bid.floorData ? bid.floorData.floorCurrency : undefined,
auctionId: auctionIdPos,
auc: bid.auc,
Expand Down
24 changes: 17 additions & 7 deletions test/spec/modules/livewrappedAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,18 +416,28 @@ describe('Livewrapped analytics adapter', function () {
{
'bidder': 'livewrapped',
'adUnitCode': 'panorama_d_1',
'bidId': '2ecff0db240757',
'floorData': {
'floorValue': 1.1,
'floorCurrency': 'SEK'
}
'bidId': '2ecff0db240757'
}
],
'start': 1519149562216
});

events.emit(BID_RESPONSE, MOCK.BID_RESPONSE[0]);
events.emit(BID_WON, MOCK.BID_WON[0]);
events.emit(BID_RESPONSE, Object.assign({},
MOCK.BID_RESPONSE[0],
{
'floorData': {
'floorValue': 1.1,
'floorCurrency': 'SEK'
}
}));
events.emit(BID_WON, Object.assign({},
MOCK.BID_WON[0],
{
'floorData': {
'floorValue': 1.1,
'floorCurrency': 'SEK'
}
}));
events.emit(AUCTION_END, MOCK.AUCTION_END);

clock.tick(BID_WON_TIMEOUT + 1000);
Expand Down