Skip to content

Conversation

@potench
Copy link

@potench potench commented Sep 8, 2020

background

  • use TCF 2.0 url param spec to initiate CMP with consent signal using ?gdpr_consent param.

test plan

yarn dev
  1. 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)

  2. 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.

  3. 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)

  4. 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)

Screen Shot 2020-09-08 at 11 00 06 AM

@potench potench merged commit 02bca16 into master Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants