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

Vidazoo Bid Adapter: send page query params to server #8715

Merged
merged 20 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d1cf0a6
feat(module): multi size request
uditalias Mar 19, 2020
1f9521d
fix getUserSyncs
shmoop207 Mar 24, 2020
8c23b90
update(module): package-lock.json from master
uditalias Mar 24, 2020
84df14e
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Apr 12, 2020
bdeebe4
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 8, 2020
8b343ce
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 17, 2020
3964277
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 1, 2020
5c82e8d
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 13, 2020
f4e3391
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 22, 2020
100c693
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jul 28, 2020
8b28ac2
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Aug 23, 2020
6edd125
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Sep 6, 2020
a2cbb4a
Merge remote-tracking branch 'upstream/master'
uditalias Nov 15, 2020
cd77e4a
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 20, 2021
4749df1
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Jun 22, 2021
65d6567
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Feb 9, 2022
f88609d
Merge branch 'master' of github.com:prebid/Prebid.js
uditalias Feb 10, 2022
1824b31
Merge remote-tracking branch 'upstream/master'
uditalias May 10, 2022
a8bfc95
Merge branch 'prebid:master' into master
uditalias Jul 20, 2022
a96fcc2
feat(module): VidazooBidAdapter - send top query params to server
uditalias Jul 20, 2022
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
14 changes: 12 additions & 2 deletions modules/vidazooBidAdapter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { _each, deepAccess, parseSizesInput } from '../src/utils.js';
import { _each, deepAccess, parseSizesInput, parseUrl } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js';
import { getStorageManager } from '../src/storageManager.js';
Expand All @@ -23,7 +23,16 @@ export const SUPPORTED_ID_SYSTEMS = {
'pubcid': 1,
'tdid': 1,
};
const storage = getStorageManager({gvlid: GVLID, bidderCode: BIDDER_CODE});
const storage = getStorageManager({ gvlid: GVLID, bidderCode: BIDDER_CODE });

function getTopWindowQueryParams() {
try {
const parsedUrl = parseUrl(window.top.document.URL, { decodeSearchAsString: true });
return parsedUrl.search;
} catch (e) {
return '';
}
}

export function createDomain(subDomain = DEFAULT_SUB_DOMAIN) {
return `https://${subDomain}.cootlogix.com`;
Expand Down Expand Up @@ -59,6 +68,7 @@ function buildRequest(bid, topWindowUrl, sizes, bidderRequest) {

let data = {
url: encodeURIComponent(topWindowUrl),
uqs: getTopWindowQueryParams(),
cb: Date.now(),
bidFloor: bidFloor,
bidId: bidId,
Expand Down
10 changes: 10 additions & 0 deletions test/spec/modules/vidazooBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ const REQUEST = {
}
};

function getTopWindowQueryParams() {
try {
const parsedUrl = utils.parseUrl(window.top.document.URL, { decodeSearchAsString: true });
return parsedUrl.search;
} catch (e) {
return '';
}
}

describe('VidazooBidAdapter', function () {
describe('validtae spec', function () {
it('exists and is a function', function () {
Expand Down Expand Up @@ -171,6 +180,7 @@ describe('VidazooBidAdapter', function () {
prebidVersion: version,
schain: BID.schain,
res: `${window.top.screen.width}x${window.top.screen.height}`,
uqs: getTopWindowQueryParams(),
'ext.param1': 'loremipsum',
'ext.param2': 'dolorsitamet',
}
Expand Down