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

update quantcastBidAdapter to make user sync flag non-constant #5949

Merged
merged 1 commit into from
Nov 16, 2020
Merged
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
9 changes: 5 additions & 4 deletions modules/quantcastBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ function checkTCFv2(tcData) {
return !!(vendorConsent && purposeConsent);
}

let hasUserSynced = false;

/**
* The documentation for Prebid.js Adapter 1.0 can be found at link below,
* http://prebid.org/dev-docs/bidder-adapter-1.html
Expand All @@ -109,7 +111,6 @@ export const spec = {
code: BIDDER_CODE,
GVLID: 11,
supportedMediaTypes: ['banner', 'video'],
hasUserSynced: false,

/**
* Verify the `AdUnits.bids` response with `true` for valid request and `false`
Expand Down Expand Up @@ -271,7 +272,7 @@ export const spec = {
},
getUserSyncs(syncOptions, serverResponses) {
const syncs = []
if (!this.hasUserSynced && syncOptions.pixelEnabled) {
if (!hasUserSynced && syncOptions.pixelEnabled) {
const responseWithUrl = find(serverResponses, serverResponse =>
utils.deepAccess(serverResponse.body, 'userSync.url')
);
Expand All @@ -283,12 +284,12 @@ export const spec = {
url: url
});
}
this.hasUserSynced = true;
hasUserSynced = true;
}
return syncs;
},
resetUserSync() {
this.hasUserSynced = false;
hasUserSynced = false;
}
};

Expand Down