feat (store: consentUrl) ?gdpr_consent url param used to automatically transfer consent signal across domains #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
background
test plan
Try with a valid consent signal and no preexisting cookies (clear your cookies): Local Test Link
Expect: CMPSave log with
consentByUrl: true, expect modal to NOT show, expect consent to change to "true" and trigger event as if user consented all (because query-param consent signal contains consent for all)Try with valid consent signal and preexisting cookie, cookie takes precedence.
Step: 1. Go to Local Test Link and decline consent for a few things.
Step 2: Refresh.
Expect: You should see consent remain declined. The url param decodes to consent-all but your cookie has consent-declined... so your cookie wins.
Try with an invalid consent signal: http://localhost:8080/tcf-2.0.html?gdpr_consent=broken-string
Step 1: clear cookies, browse to url above
Expect: Error log visible in dev console, initialize CMP as if no consent signal provided (new user)
Try with no consent signal http://localhost:8080/tcf-2.0.html
Step 1: clear cookies, browse to url above
Expect: consent false by default, show UI tool, do not persist consent signal until saved. (standard behavior, no change from previous CMP version)