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

Feedad Bid Adapter: added new bid request parameters #9397

Merged
merged 53 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6813398
added file scaffold
couchcrew-thomas May 2, 2019
030a709
added isBidRequestValid implementation
couchcrew-thomas May 7, 2019
1ac46eb
added local prototype of ad integration
couchcrew-thomas May 8, 2019
fdcee20
added implementation for placement ID validation
couchcrew-thomas May 20, 2019
1938094
fixed video context filter
couchcrew-thomas May 20, 2019
478b00d
applied lint to feedad bid adapter
couchcrew-thomas May 20, 2019
494258e
added unit test for bid request validation
couchcrew-thomas May 20, 2019
c7111e8
added buildRequest unit test
couchcrew-thomas May 20, 2019
e57779c
added unit tests for timeout and bid won callbacks
couchcrew-thomas May 22, 2019
0af865c
updated bid request to FeedAd API
couchcrew-thomas Jun 3, 2019
4d21899
added parsing of feedad api bid response
couchcrew-thomas Jun 3, 2019
3185358
added transmisison of tracking events to FeedAd Api
couchcrew-thomas Jun 5, 2019
d7673e4
code cleanup
couchcrew-thomas Jun 7, 2019
79a3cbc
updated feedad unit tests for buildRequest method
couchcrew-thomas Jun 7, 2019
d446300
added unit tests for event tracking implementation
couchcrew-thomas Jun 7, 2019
766f23c
added unit test for interpretResponse method
couchcrew-thomas Jun 7, 2019
2d469c0
added adapter documentation
couchcrew-thomas Jun 7, 2019
138d1ff
added dedicated feedad example page
couchcrew-thomas Jun 7, 2019
e4c7214
updated feedad adapter to use live system
couchcrew-thomas Jun 7, 2019
0eabd34
updated FeedAd adapter placement ID regex
couchcrew-thomas Jun 10, 2019
1ff7caa
removed groups from FeedAd adapter placement ID regex
couchcrew-thomas Jun 11, 2019
748590e
removed dedicated feedad example page
couchcrew-thomas Jun 14, 2019
98e422a
updated imports in FeedAd adapter file to use relative paths
couchcrew-thomas Jun 14, 2019
f2836f3
updated FeedAd adapter unit test to use sinon.useFakeXMLHttpRequest()
couchcrew-thomas Jun 14, 2019
7e8b354
merged upstream
couchcrew-thomas Jun 4, 2020
d536db6
Merge remote-tracking branch 'upstream/master'
couchcrew-thomas Nov 13, 2020
0fd9ea2
Merge remote-tracking branch 'upstream/master'
couchcrew-thomas Apr 6, 2021
d9f9124
added GDPR fields to the FeedAd bid request
couchcrew-thomas Apr 7, 2021
19456aa
removed video from supported media types of the FeedAd adapter
couchcrew-thomas Apr 7, 2021
3ed8246
increased version code of FeedAd adapter to 1.0.2
couchcrew-thomas Apr 7, 2021
b8f178c
removed unnecessary check of bidder request
couchcrew-thomas Apr 7, 2021
67014fd
fixed unit test testing for old FeedAd version
couchcrew-thomas Apr 7, 2021
e7e7dff
removed video media type example from documentation file
couchcrew-thomas Apr 7, 2021
c8242fb
added gvlid to FeedAd adapter
couchcrew-thomas Apr 9, 2021
054750d
Merge remote-tracking branch 'upstream/master'
couchcrew-thomas Apr 16, 2021
11700ed
Merge branch 'master' of github-feedad:prebid/Prebid.js
couchcrew-thomas Jun 9, 2021
66f346f
Merge branch 'master' of github-feedad:prebid/Prebid.js
couchcrew-thomas Dec 7, 2021
3bd97a9
added decoration parameter to adapter documentation
couchcrew-thomas Dec 7, 2021
2aa7c00
added pass through of additional bid parameters
couchcrew-thomas Dec 7, 2021
60c822e
Merge branch 'prebid:master' into feedad
couchcrew-thomas Sep 8, 2022
1d86272
added user syncs to FeedAd bid adapter
couchcrew-thomas Sep 8, 2022
f76f232
increased FeedAd bid adapter version
couchcrew-thomas Sep 8, 2022
d9d266c
lint pass over FeedAd bid adapter
couchcrew-thomas Sep 8, 2022
85276cc
Merge remote-tracking branch 'upstream/master'
couchcrew-thomas Dec 20, 2022
181272b
Merge branch 'master' into feedad
couchcrew-thomas Dec 20, 2022
e23c75a
fixed parsing of user syncs from server response
couchcrew-thomas Dec 20, 2022
2f98d6d
increased FeedAd bid adapter version
couchcrew-thomas Dec 20, 2022
6b013f6
fixed version code in test file
couchcrew-thomas Dec 20, 2022
b5e031a
Merge remote-tracking branch 'upstream/master'
couchcrew-thomas Jan 5, 2023
d93f4dd
added adapter and prebid version to bid request parameters
couchcrew-thomas Jan 5, 2023
b443e10
removed TODO item
couchcrew-thomas Jan 5, 2023
f1209aa
added missing test case for user syncs
couchcrew-thomas Jan 5, 2023
485e41b
increased adapter version to 1.0.5
couchcrew-thomas Jan 5, 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
12 changes: 7 additions & 5 deletions modules/feedadBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ajax} from '../src/ajax.js';
* Version of the FeedAd bid adapter
* @type {string}
*/
const VERSION = '1.0.4';
const VERSION = '1.0.5';

/**
* @typedef {object} FeedAdApiBidRequest
Expand All @@ -16,7 +16,8 @@ const VERSION = '1.0.4';
* @property {number} ad_type
* @property {string} client_token
* @property {string} placement_id
* @property {string} sdk_version
* @property {string} prebid_adapter_version
* @property {string} prebid_sdk_version
* @property {boolean} app_hybrid
*
* @property {string} [app_bundle_id]
Expand Down Expand Up @@ -181,7 +182,8 @@ function createApiBidRParams(request) {
ad_type: 0,
client_token: request.params.clientToken,
placement_id: request.params.placementId,
sdk_version: `prebid_${VERSION}`,
prebid_adapter_version: VERSION,
prebid_sdk_version: '$prebid.version$',
app_hybrid: false,
});
}
Expand All @@ -207,7 +209,6 @@ function buildRequests(validBidRequests, bidderRequest) {
})
});
data.bids.forEach(bid => BID_METADATA[bid.bidId] = {
// TODO: is 'page' the right value here?
referer: data.refererInfo.page,
transactionId: bid.transactionId
});
Expand Down Expand Up @@ -266,7 +267,8 @@ function createTrackingParams(data, klass) {
prebid_bid_id: bidId,
prebid_transaction_id: transactionId,
referer,
sdk_version: VERSION
prebid_adapter_version: VERSION,
prebid_sdk_version: '$prebid.version$',
};
}

Expand Down
24 changes: 23 additions & 1 deletion test/spec/modules/feedadBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {BANNER, NATIVE, VIDEO} from '../../../src/mediaTypes.js';
import {server} from 'test/mocks/xhr.js';

const CODE = 'feedad';
const EXPECTED_ADAPTER_VERSION = '1.0.5';

describe('FeedAdAdapter', function () {
describe('Public API', function () {
Expand Down Expand Up @@ -300,6 +301,20 @@ describe('FeedAdAdapter', function () {
expect(result.data.gdprApplies).to.equal(request.gdprConsent.gdprApplies);
expect(result.data.consentIabTcf).to.equal(request.gdprConsent.consentString);
});
it('should include adapter and prebid version', function () {
let bid = {
code: 'feedad',
mediaTypes: {
banner: {
sizes: [[320, 250]]
}
},
params: {clientToken: 'clientToken', placementId: 'placement-id'}
};
let result = spec.buildRequests([bid], bidderRequest);
expect(result.data.bids[0].params.prebid_adapter_version).to.equal(EXPECTED_ADAPTER_VERSION);
expect(result.data.bids[0].params.prebid_sdk_version).to.equal('$prebid.version$');
});
});

describe('interpretResponse', function () {
Expand Down Expand Up @@ -482,6 +497,12 @@ describe('FeedAdAdapter', function () {
expect(() => spec.getUserSyncs({iframeEnabled: true, pixelEnabled: true}, it)).not.to.throw;
});
});

it('should return empty array if the body extension is null', function () {
const response = mockServerResponse({ext: null});
const result = spec.getUserSyncs({iframeEnabled: true, pixelEnabled: true}, response);
expect(result).to.deep.equal([]);
});
});

describe('event tracking calls', function () {
Expand Down Expand Up @@ -617,7 +638,8 @@ describe('FeedAdAdapter', function () {
prebid_bid_id: bidId,
prebid_transaction_id: transactionId,
referer,
sdk_version: '1.0.4'
prebid_adapter_version: EXPECTED_ADAPTER_VERSION,
prebid_sdk_version: '$prebid.version$',
};
subject(data);
expect(server.requests.length).to.equal(1);
Expand Down