Skip to main content

Cookie Consent Mode

Learn how to configure Wisepops to respect visitors' cookie consent preferences.

Updated today

By default, Wisepops stores persistent cookies to track user sessions and behavior across visits. However, some jurisdictions require the visitor to opt-in for long term tracking.

With the Wisepops consent mode feature, you can:

  • Set the default consent status for visitors,

  • Update the consent status when a visitor accepts cookies,

  • Let Wisepops automatically switch between session-only and persistent cookies based on the consent.


Consent status

granted (default)

  • Cookies persist across browser sessions,

  • Visitor behavior and preferences are tracked long-term,

  • This is the default state if no configuration is provided.

denied

  • Cookies are stored only during the current browser session,

  • This is compliant with jurisdictions requiring opt-in consent for long term tracking, such as the European Union,

  • Some targeting features won't work, such as returning visitor, past URL targeting, don't display if already signed up, etc.

Setting the default consent

If you use Wisepops with Shopify, you can skip to the Shopify section.

You can configure the default consent state when initializing Wisepops.

wisepops('options', { defaultConsent: 'denied' });

This configuration must be added at the end of the Wisepops setup code, before the closing </script> tag, like this:

Updating the consent status

When a visitor provides consent (for example, through a cookie banner or consent dialog), you can update their consent status:

wisepops('consent', 'granted');

When this method is called:

  • Wisepops automatically converts session cookies to persistent cookies,

  • The visitor's activity will be tracked across sessions,

  • This consent grant is also stored persistently, so Wisepops will remember the visitor's approval on their next visits.

Currently, it is not possible to revoke the consent (opt-out). Executing the following code produces an error: wisepops('consent', 'denied');


Implementation example

Here's a typical implementation that sets the consent as denied by default, and grants it when the visitor accepts it:

<script>
// Your Wisepops initialization code here

// Consent configuration inside the setup script
wisepops('options', { defaultConsent: 'denied' });
</script>

<script>
// Somewhere else in your page, handle consent approval
document.getElementById('accept-cookies').addEventListener('click', function() {
wisepops('consent', 'granted');
});
</script>

Best practices

  • Set default consent early: Call the options method just after the Wisepops setup code, before Wisepops starts tracking user behavior,

  • Respect visitor choice: Only call wisepops('consent', 'granted'); after explicit visitor action,

  • Comply with regulations: Configure default consent based on your legal requirements (GDPR, CCPA, etc.),

  • Test both states: Verify that your implementation works correctly in both “denied” and “granted” statuses.


Shopify integration

Wisepops integrates seamlessly with the Shopify's Customer Privacy API. You don't need to write any code, Wisepops will adhere to the Customer Privacy settings you have selected in your Shopify account.

To review your Shopify privacy settings:

  1. Verify that the cookie banner is enabled and configured,

  2. Ensure that your consent preferences comply with your legal obligations.

You may want to keep your store settings as they are, but have Wisepops ignore the Shopify Customer Privacy API. To do this, please contact our support team.


Privacy compliance

This feature is designed to help you comply with privacy regulations such as the GDPR and CCPA. However, consent management is only one aspect of compliance. Ensure that your overall implementation:

  • Provides clear information about the use of cookies,

  • Offers visitors a genuine choice,

  • Respects visitor preferences,

  • Maintains appropriate records of consent.

Did this answer your question?