> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.pandectes.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to check and interpret the consent cookie

**Learn how to check and interpret the consent cookie on your Shopify store with our detailed guide. Gain insights into managing user consent effectively.**

### Introduction

Our app is a critical application for Shopify stores, ensuring that user consent is obtained and recorded in compliance with GDPR regulations. This guide provides a step-by-step process to check and interpret the consent cookies stored by the app.

### Step 1: Locating the Consent Cookie

When a user gives consent, the app stores this consent in a cookie named "_pandectes_gdpr." This cookie contains base64 encoded information about the user's consent.

###### How to Access the Cookie

* Open your web browser’s developer tools. This can usually be done by right-clicking on your website and selecting "Inspect" or pressing F12 or Ctrl+Shift+I on your keyboard.
* Navigate to the 'Application' tab.
* In the left sidebar, under the 'Storage' section, click on 'Cookies' and select your website.
* Look for the cookie named "_pandectes_gdpr."

### Step 2: Decoding the Cookie

The value of the "_pandectes_gdpr" cookie is base64 encoded. To decode it:

* Copy the value of the "_pandectes_gdpr" cookie.
* Open the console tab in your developer tools.
* Type `window.atob("COPIED_COOKIE_VALUE")` and press Enter.
* The console will display the decoded value.

### Step 3: Interpreting the Decoded Value

The decoded value of the cookie will be in the following format:

```
id: "UNIQUE_CONSENT_ID"
preferences: INTEGER
status: "allow" / "deny" / "custom"
timestamp: TIMESTAMP
version: INTEGER
country.code: 2-char Country code
country.state: 2-char State code
```

###### Understanding the Fields

1. **ID**: This is the unique consent ID assigned to the user’s consent.
2. **Preferences**: This is a decimal value (ranging from 0 to 7) representing a 3-bit bitwise value. Each bit corresponds to a category of consent:
* Bit at position 0 (least significant bit): Functionality.
* Bit at position 1: Performance.
* Bit at position 2 (most significant bit): Targeting.
3. **Status**: Indicates the consent status:
* Allow: All categories are accepted.
* Deny: All categories are declined, except for strictly required cookies.
* Custom: The visitor has accepted some but not all categories.
4. **Timestamp**: The Unix timestamp indicating when the consent was given.

###### Decoding the Preferences

Each bit in the preferences value represents the user’s consent for a specific category. A bit set to 1 means consent is rejected for that category. For example:

* A value of 0 (binary 000) means consent is given for all categories.
* A value of 5 (binary 101) means consent is rejected for Functionality and Targeting, but given for Performance.

### Conclusion

Understanding and interpreting the consent cookies set by the app is essential for Shopify store owners. By following these steps, store owners can ensure they are correctly reading and respecting the consent preferences of their visitors, maintaining compliance with GDPR.