Show Consent Information to current user

Description

I would like to show user consents on my security page to current user sessions:

  • when the consented to each cookie, how long the cookie is valid for, cookie consent id.

Site URL

Required: Please provide a staging/production URL where we can see the issue

Steps to Reproduce

  1. [First step]
  2. [Second step]
  3. [Third step]

Expected Behavior

[What did you expect to happen?]

Actual Behavior

[What actually happened?]

Video/Screenshots

Required: Please provide a short screen recording showing the issue

  • Video link: [Loom/Screen recording URL]
  • Screenshots (if applicable): [Upload or link to screenshots]

Additional Context

  • Browser: [e.g., Chrome 120, Safari 17]
  • Device: [e.g., Desktop, iPhone 14]

NDA Notice: If you’re under an NDA, please feel free to send us a Direct Message/Email with the above information.

@hallo :waving_hand:

You can display user consent information on your security page using the Finsweet Cookie Consent API. This will let you show when users consented to cookies, validity periods, and consent IDs.

You can access the consent data with this approach:

<script>
  window.FinsweetConsentPro = window.FinsweetConsentPro || [];
  window.FinsweetConsentPro.push([
    'consent',
    (instance) => {
      console.log('Consent Pro loaded successfully!', instance);

      // Access the current consent state
      const store = instance.getStore();
      console.log('Current consents:', store.consents);
    },
  ]);
</script>

From this, you can extract and display:

  • Which cookie types the user accepted/denied
  • When they made their choice
  • How long the consent is valid
  • The unique consent identifier

You can read more about the API documentation here