Skip to content

Commit

Permalink
Add source and version parameters to the 33across ID request (prebid#…
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosfelix authored and jorgeluisrocha committed May 18, 2023
1 parent 70a7283 commit 0d14169
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions modules/33acrossIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { uspDataHandler } from '../src/adapterManager.js';
const MODULE_NAME = '33acrossId';
const API_URL = 'https://lexicon.33across.com/v1/envelope';
const AJAX_TIMEOUT = 10000;
const CALLER_NAME = 'pbjs';

function getEnvelope(response) {
if (!response.succeeded) {
Expand All @@ -36,6 +37,8 @@ function calculateQueryStringParams(pid, gdprConsentData) {
const params = {
pid,
gdpr: Number(gdprApplies),
src: CALLER_NAME,
ver: '$prebid.version$'
};

if (uspString) {
Expand Down
5 changes: 4 additions & 1 deletion test/spec/modules/33acrossIdSystem_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ describe('33acrossIdSystem', () => {

expect(request.method).to.equal('GET');
expect(request.withCredentials).to.be.true;
expect(request.url).to.contain('https://lexicon.33across.com/v1/envelope?pid=12345');

const regExp = new RegExp('https://lexicon.33across.com/v1/envelope\\?pid=12345&gdpr=\\d&src=pbjs&ver=$prebid.version$');

expect(request.url).to.match(regExp);
expect(completeCallback.calledOnceWithExactly('foo')).to.be.true;
});

Expand Down

0 comments on commit 0d14169

Please sign in to comment.