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

# Google Consent Mode debug console

### 1. What the debug console is and when to use it

**Debug mode / console diagnostics** is a diagnostic option inside the Pandectes GDPR Compliance Google Consent Mode integration. When enabled, Pandectes injects a lightweight script into your Shopify storefront that monitors the `dataLayer` in real time and reports consent mode problems directly to the **browser developer console**.

It detects the following classes of issues:

* A tag reading consent state before any default was set (**late consent signal**) — commonly caused by Google Tag Gateway (GTG).
* A consent `update` command arriving before a `default` command (**wrong execution order**).
* A `default` command arriving after an `update` command has already been sent (**wrong execution order**).
* Consent types in the `default` command set to `granted` when they should be `denied` (**incorrect default permissions**).

Use it when:

* You are setting up Google Consent Mode for the first time and want to verify everything is working.
* Google Tag Assistant, Google Ads, or Google Analytics is reporting a consent mode warning (for example, "default consent not set" or "consent set too late").
* You suspect a theme change or a third-party app has broken the consent signal.

> **Important:** Debug mode outputs to the **browser developer console on your live storefront**, not inside the Pandectes app. Disable it once you have finished debugging — leave it enabled in production only if you are actively investigating an issue.

> **Publishing note:** Screenshots below use local file paths. When publishing to the help center, re-upload each image directly through the Intercom editor and replace the local paths with the hosted URLs.

### 2. How to enable debug mode

1. In the Pandectes GDPR Compliance app, go to **Settings → Integrations**.
2. Open the **Google Consent Mode** integration.

![](https://storage.crisp.chat/users/helpdesk/website/-/1/a/5/a/1a5af239e847cf00/image_1ffg9e0.png =800x643)

3. Scroll down and click **Advanced settings** to expand the section.
4. Check **Debug mode / console diagnostics**.
5. Click **Save**.

![](https://storage.crisp.chat/users/helpdesk/website/-/1/a/5/a/1a5af239e847cf00/image_x5blhl.png =800x321)

The option is described in the app as: *"Helps to detect late consent, missing commands, invalid execution order and incorrect permissions. Late consent may be observed in cases where Google Tag Gateway (GTG) has been adopted."*

### 3. How to read the debug output

With debug mode enabled, open your **live Shopify storefront** in a browser (not the Shopify admin preview), then open **Developer Tools → Console** tab.

All messages from the debug script are prefixed with:

```
[Pandectes :: Google Consent Mode debug]:
```

Messages appear as **warnings** (yellow triangle icon). If the console is clean — no messages with this prefix — your consent mode setup is working correctly.

To filter to only Pandectes debug messages, type `Pandectes` in the Console filter box.

#### Command tables

![](https://storage.crisp.chat/users/helpdesk/website/-/1/a/5/a/1a5af239e847cf00/image_kjnhzo.png =800x590)

Alongside any warnings, the debug script logs a console table for **every consent command it detects in the dataLayer** — one row per consent type, showing its value. This lets you inspect exactly what was sent to Google for each `default` and `update` command. If no warning messages appear, the commands are well-formed and in the correct order.

### 4. Console messages
###### 4.1 Late consent signal

**Message:**
```
a tag read consent state before a default was set (late consent signal).
This often happens if Google Tag Gateway has been adopted.
To verify visit https://help.pandectes.io/en/article/gtg.
```

![](https://storage.crisp.chat/users/helpdesk/website/-/1/a/5/a/1a5af239e847cf00/image_1pcv9uu.png =800x413)

**What it means:**
A Google tag read the consent state before Pandectes had a chance to set the consent defaults. The tag fired without knowing what the user's (or the store's configured default) consent state was. This is the most common consequence of **Google Tag Gateway (GTG)** with one-click CDN injection, which loads the Google tag before any other scripts on the page.

**What to do:**
Follow the remediation guide in the [Google tag gateway (GTG) and consent](https://help.pandectes.io/en/article/gtg) article. In summary:

* **Recommended:** Enable advanced consent mode (U+C) in Pandectes — this removes the dependency on load order entirely.
* **Alternative:** Consolidate all Google tags into a GTM container and use the Pandectes CMP tag template.
* **Alternative:** Switch from one-click CDN injection to manual GTG setup, placing the GTG snippet after `pandectes-rules.js` in `theme.liquid`.

###### 4.2 Update command without a prior default

**Message:**
```
"update" command was sent but there was no "default" command before it.
```

![](https://storage.crisp.chat/users/helpdesk/website/-/1/a/5/a/1a5af239e847cf00/image_khn8d.png =800x413)

**What it means:**
A consent `update` command (which reflects the user's actual banner choice) was sent to Google before any `default` command had been sent. This means Google tags had no initial consent baseline to work from. Without a default, Google cannot correctly model consent for users who leave the page before interacting with the banner.

**What to do:**
Ensure that `pandectes-rules.js` is loading correctly and is positioned before all Google tags in your `theme.liquid`. This script is responsible for sending the `default` command on page load. If it is missing or loading too late, the `update` arrives first. See the [Integrations setup guide](https://help.pandectes.io/en/article/integrations-setup-guide-2ovcos/) for instructions on verifying and fixing the manual setup.

###### 4.3 Default command after an update

**Message:**
```
"default" command was sent but there was already an "update" command before it.
```

**What it means:**
The `default` command (sent by Pandectes on page load to establish the baseline consent state) arrived *after* an `update` command had already been sent. This is the reverse of the expected order and typically means the Pandectes script is loading later than a Google tag that is also trying to initialise consent mode.

**What to do:**
This is a load-order problem. Check that `pandectes-rules.js` appears as early as possible in `<head>` — specifically **before** any Google tags or GTM snippet. If you are using Google Tag Gateway, this warning may appear alongside the late consent signal warning; in that case, the GTG remediation steps above apply.

###### 4.4 Incorrect default permissions

**Message:**
```
all types in a "default" command should be set to "denied" except for
security_storage that should be set to "granted"
```


![](https://storage.crisp.chat/users/helpdesk/website/-/1/a/5/a/1a5af239e847cf00/image_hsv6i6.png =800x413)

**What it means:**
The `default` consent command that Pandectes sent to Google has one or more consent types set to `granted` instead of `denied`. In opt-in regions (EEA, UK, Switzerland), consent types such as `ad_storage`, `ad_user_data`, `ad_personalization`, and `analytics_storage` must default to `denied` before the user makes a choice. Only `security_storage` is expected to default to `granted`. Having any of the others default to `granted` means Google tags may run with full measurement before the user has consented.

**What to do:**
In the Pandectes app, go to **Settings → Integrations → Google Consent Mode → Advanced settings → Consent types**. Review the default value set for each consent type. Set `ad_storage`, `ad_user_data`, `ad_personalization`, and `analytics_storage` to **Denied**. Leave `security_storage` as **Granted**. Save and re-check the console.

### 5. Relevant documentation

**Pandectes**

* **Using Google Consent Mode integration (setup guide):** [https://help.pandectes.io/en/article/using-google-consent-mode-integration-1xkfv6o/](https://help.pandectes.io/en/article/using-google-consent-mode-integration-1xkfv6o/)
* **Integrations setup guide (`pandectes-rules.js`&#32;manual setup):** [https://help.pandectes.io/en/article/integrations-setup-guide-2ovcos/](https://help.pandectes.io/en/article/integrations-setup-guide-2ovcos/)
* **Google tag gateway (GTG) and consent:** [https://help.pandectes.io/en/article/gtg](https://help.pandectes.io/en/article/gtg)

**Google**

* **Troubleshoot consent mode (Tag Manager Help):** [https://support.google.com/tagmanager/answer/14522438](https://support.google.com/tagmanager/answer/14522438)
* **Troubleshoot consent mode with Tag Assistant (developers):** [https://developers.google.com/tag-platform/security/guides/consent-debugging](https://developers.google.com/tag-platform/security/guides/consent-debugging)
* **Consent mode overview:** [https://developers.google.com/tag-platform/security/concepts/consent-mode](https://developers.google.com/tag-platform/security/concepts/consent-mode)
