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

MinuteMedia Bid Adapter: Support Coppa param #9838

Merged
merged 52 commits into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
3cfdf9d
add Rise adapter
noamtzuberi Jan 3, 2021
923e646
fixes
noamtzuberi Jan 3, 2021
499f36f
change param isOrg to org
noamtzuberi Jan 5, 2021
d33a8af
Rise adapter
noamtzuberi Jan 5, 2021
b2cdd97
change email for rise
noamtzuberi Jan 5, 2021
b8a140c
change email for rise
noamtzuberi Jan 5, 2021
3ce6a3b
fix circle failed
noamtzuberi Jan 5, 2021
dd10c25
bump
noamtzuberi Jan 5, 2021
464d2b7
bump
noamtzuberi Jan 5, 2021
1c52066
bump
noamtzuberi Jan 5, 2021
2b1fad5
remove space
noamtzuberi Jan 6, 2021
b08dd59
Merge branch 'master' of https://github.com/streamrail/Prebid.js
noamtzu Jul 6, 2021
924bb15
Upgrade Rise adapter to 5.0
noamtzu Jul 6, 2021
0f9e730
Merge branch 'prebid:master' into master
noamtzu Jul 13, 2021
87c6a56
Merge branch 'prebid:master' into master
noamtzu Jul 20, 2021
e8e613b
Merge branch 'master' of https://github.com/streamrail/Prebid.js
noamtzu Aug 18, 2021
1ba7048
Merge branch 'master' of github.com:prebid/Prebid.js
Aug 23, 2021
a032702
Merge branch 'prebid:master' into master
noamtzu Aug 27, 2021
a5e5954
Merge branch 'prebid:master' into master
noamtzu Sep 5, 2021
bc2dafd
Merge branch 'prebid:master' into master
noamtzu Sep 12, 2021
75344c1
Merge branch 'prebid:master' into master
noamtzu Sep 19, 2021
2e17e14
Merge branch 'prebid:master' into master
noamtzu Nov 21, 2021
03099f3
Merge branch 'prebid:master' into master
noamtzu Jan 13, 2022
5c30696
Merge branch 'prebid:master' into master
noamtzu Jan 17, 2022
bc1d897
Merge branch 'prebid:master' into master
noamtzu Jan 23, 2022
3ed7867
Merge branch 'prebid:master' into master
noamtzu Jan 27, 2022
9d8d6af
Merge branch 'prebid:master' into master
noamtzu Jan 30, 2022
12ef7fb
Merge branch 'prebid:master' into master
noamtzu Feb 10, 2022
a4bfb4f
Merge branch 'prebid:master' into master
OronW Feb 17, 2022
901d081
Merge branch 'prebid:master' into master
noamtzu Feb 21, 2022
33be3da
Merge branch 'prebid:master' into master
noamtzu Mar 7, 2022
0305688
Merge branch 'prebid:master' into master
noamtzu Mar 29, 2022
968253b
Merge branch 'prebid:master' into master
noamtzu Apr 3, 2022
208a3ef
Merge branch 'prebid:master' into master
noamtzu Apr 17, 2022
756ccf3
Merge branch 'prebid:master' into master
noamtzu May 12, 2022
dc33d03
Merge branch 'prebid:master' into master
noamtzu May 22, 2022
e27c291
Merge branch 'prebid:master' into master
noamtzu May 25, 2022
4fc0639
Merge branch 'prebid:master' into master
noamtzu Jun 8, 2022
4bbbbb3
Merge branch 'prebid:master' into master
noamtzu Jun 9, 2022
8e9318d
Merge branch 'prebid:master' into master
lasloche Jun 14, 2022
27e9a02
Merge branch 'prebid:master' into master
noamtzu Aug 3, 2022
a6489ff
Merge branch 'prebid:master' into master
innay Dec 12, 2022
7cdb4e5
added isWrapper param
innay Dec 12, 2022
ed9a426
Merge pull request #20 from streamrail/IVP-3999
innay Dec 12, 2022
79acf21
addes is_wrapper parameter to documentation
innay Dec 28, 2022
36d0c50
added is_wrapper to test
innay Dec 28, 2022
3b8885e
removed isWrapper
innay Dec 28, 2022
4c4b4f9
Merge pull request #21 from streamrail/IVP-3999
innay Dec 28, 2022
0669be2
add coppa tests
Apr 17, 2023
fe9ef4d
Update coppa tests
Apr 17, 2023
269b9b5
update coppa param fetch
May 2, 2023
e177882
update Coppa tests
May 4, 2023
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: 6 additions & 0 deletions modules/minutemediaBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ function generateBidParameters(bid, bidderRequest) {
loop: getBidIdParameter('bidderRequestsCount', bid),
bidderRequestId: getBidIdParameter('bidderRequestId', bid),
transactionId: getBidIdParameter('transactionId', bid),
coppa: 0
};

const pos = deepAccess(bid, `mediaTypes.${mediaType}.pos`);
Expand Down Expand Up @@ -346,6 +347,11 @@ function generateBidParameters(bid, bidderRequest) {
if (linearity) {
bidObject.linearity = linearity;
}

const coppa = deepAccess(bid, `ortb2.regs.coppa`);
if (coppa) {
bidObject.coppa = 1;
}
}

return bidObject;
Expand Down
3 changes: 2 additions & 1 deletion modules/riseBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,8 @@ function generateGeneralParams(generalObject, bidderRequest) {
dnt: (navigator.doNotTrack == 'yes' || navigator.doNotTrack == '1' || navigator.msDoNotTrack == '1') ? 1 : 0,
device_type: getDeviceType(navigator.userAgent),
ua: navigator.userAgent,
session_id: getBidIdParameter('auctionId', generalObject),
is_wrapper: !!generalBidParams.isWrapper,
session_id: generalBidParams.sessionId || getBidIdParameter('auctionId', generalObject),
tmax: timeout
};

Expand Down
2 changes: 2 additions & 0 deletions modules/riseBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The adapter supports Video(instream).
| `placementId` | optional | String | A unique placement identifier | "12345678"
| `testMode` | optional | Boolean | This activates the test mode | false
| `rtbDomain` | optional | String | Sets the seller end point | "www.test.com"
| `is_wrapper` | private | Boolean | Please don't use unless your account manager asked you to | false


# Test Parameters
```javascript
Expand Down
18 changes: 18 additions & 0 deletions test/spec/modules/minutemediaBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,24 @@ describe('minutemediaAdapter', function () {
expect(request.data.bids[0]).to.be.an('object');
expect(request.data.bids[0]).to.have.property('floorPrice', 1.5);
});

describe('COPPA Param', function() {
it('should set coppa equal 0 in bid request if coppa is set to false', function() {
const request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.data.bids[0].coppa).to.be.equal(0);
});

it('should set coppa equal 1 in bid request if coppa is set to true', function() {
const bid = utils.deepClone(bidRequests[0]);
bid.ortb2 = {
'regs': {
'coppa': true,
}
};
const request = spec.buildRequests([bid], bidderRequest);
expect(request.data.bids[0].coppa).to.be.equal(1);
});
});
});

describe('interpretResponse', function () {
Expand Down
7 changes: 7 additions & 0 deletions test/spec/modules/riseBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ describe('riseAdapter', function () {
expect(request.data.bids[0].placementId).to.equal(placementId);
});

it('sends the is_wrapper parameter to ENDPOINT via POST', function() {
const request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.data.params).to.be.an('object');
expect(request.data.params).to.have.property('is_wrapper');
expect(request.data.params.is_wrapper).to.equal(false);
});

it('sends bid request to ENDPOINT via POST', function () {
const request = spec.buildRequests(bidRequests, bidderRequest);
expect(request.url).to.equal(ENDPOINT);
Expand Down