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

Ras Bid Adapter: support for SlotSequence parameter #8792

Merged
merged 3 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
3 changes: 3 additions & 0 deletions modules/rasBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const getSlots = (bidRequests) => {
if (sizes.length) {
queryString += `&iusizes${i}=${encodeURIComponent(sizes)}`;
}
if (Object.prototype.hasOwnProperty.call(adunit.params, 'pos')) {
queryString += `&pos${i}=${encodeURIComponent(adunit.params.pos)}`;
}
}
return queryString;
};
Expand Down
1 change: 1 addition & 0 deletions modules/rasBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var adUnits = [{
| site | required | String | Specific identifier name (case-insensitive) that is associated with this ad unit and provided by RAS | `"example_com"`
| area | required | String | Ad unit category name; only case-insensitive alphanumeric with underscores and hyphens are allowed | `"sport"`
| slot | required | String | Ad unit placement name (case-insensitive) provided by RAS | `"slot"`
| pos | optional | Number | Ad unit placement position provided by RAS | `1`
| pageContext | optional | Object | Web page context data | `{}`
| pageContext.dr | optional | String | Document referrer URL address | `"https://example.com/"`
| pageContext.du | optional | String | Document URL address | `"https://example.com/sport/football/article.html?id=932016a5-02fc-4d5c-b643-fafc2f270f06"`
Expand Down
2 changes: 2 additions & 0 deletions test/spec/modules/rasBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ describe('rasBidAdapter', function () {
slot: 'test',
area: 'areatest',
site: 'test',
pos: '0',
network: '4178463'
}
};
Expand Down Expand Up @@ -140,6 +141,7 @@ describe('rasBidAdapter', function () {
expect(requests[0].url).to.have.string('DV=test%2Fareatest');
expect(requests[0].url).to.have.string('kwrd=val1%2Bval2');
expect(requests[0].url).to.have.string('kvadunit=test%2Fareatest');
expect(requests[0].url).to.have.string('pos0=0');
});
});

Expand Down