Add a cookie compliance banner to your theme

You can add a cookie compliance banner to your theme to allow customers to consent to tracking of non-essential cookies. This allows customers to consent to relevant, region-specific, tracking laws such as GDPR and CCPA.

There are two main aspects to adding this to your theme:

The functionality of the banner in the example below provides customers with the option to "accept" or "decline" cookie tracking, hides the banner once a selection has been made, and saves the selection to prevent the banner from being shown in the future. This selection is saved for 365 days, or until the customer clears their cookies.