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

Rubicon Analytics: Pick up wrapper family field #6272

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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: 2 additions & 1 deletion modules/rubiconAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,10 @@ function sendMessage(auctionId, bidWonId) {
referrerHostname: rubiconAdapter.referrerHostname || getHostNameFromReferer(referrer),
channel: 'web',
};
if (rubiConf.wrapperName || rubiConf.rule_name) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapperName is there always when rule_name is so we will only check it. same with new field family

if (rubiConf.wrapperName) {
message.wrapper = {
name: rubiConf.wrapperName,
family: rubiConf.wrapperFamily,
rule: rubiConf.rule_name
}
}
Expand Down
6 changes: 4 additions & 2 deletions test/spec/modules/rubiconAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,8 @@ describe('rubicon analytics adapter', function () {
describe('wrapper details passed in', () => {
it('should correctly pass in the wrapper details if provided', () => {
config.setConfig({rubicon: {
wrapperName: '1001_wrapperName',
wrapperName: '1001_wrapperName_exp.4',
wrapperFamily: '1001_wrapperName',
rule_name: 'na-mobile'
}});

Expand All @@ -1771,7 +1772,8 @@ describe('rubicon analytics adapter', function () {
const request = server.requests[0];
const message = JSON.parse(request.requestBody);
expect(message.wrapper).to.deep.equal({
name: '1001_wrapperName',
name: '1001_wrapperName_exp.4',
family: '1001_wrapperName',
rule: 'na-mobile'
});

Expand Down