Skip to content
Back to Documentation

COKIQ docs

Debug mode

Turn on COKIQ debug mode to see the consent default, updates, Google consent state and hits in the browser console, and get a warning when a Google tag runs before the consent default.

Best for

Site owners, developers and agencies checking a COKIQ + Google tag setup.

What debug mode tells you

Debug mode only writes to your own browser console. Visitors see nothing and no extra data is sent anywhere.

Load order check

"OK: COKIQ set the consent default before any Google tag ran" or a red "LATE CONSENT" message when a Google tag was already running when COKIQ loaded.

Consent state

The default COKIQ set (per region when the banner is limited to the EEA, UK and Switzerland), every update after a choice, the visitor country and profile, and whether the banner was shown.

Google signals

A report 3 seconds after load with the consent commands in the dataLayer, the consent state the Google tag reports (default and update per type, as a table) and the gcs/gcd values on Google hits.

Google tag gateway hint

A warning when a Google tag is served from your own domain, which usually means Google tag gateway, with a link to the GTG guide.

Setup steps

Step 1

Turn it on

Dashboard: Banner > Google Consent Mode v2 > tick "Debug mode" and save (all visitors' consoles, so switch it off afterwards). Or, without saving anything, open any page of your site with ?cokiq_debug=1 (stays on for that browser tab) or run localStorage.setItem("cokiq_debug", "1") in the console. Turn it off with ?cokiq_debug=0.

Step 2

Open the console

Chrome: View > Developer > JavaScript Console. Look for lines starting with "COKIQ debug". Run Cokiq.debugReport() at any time for a fresh report.

Step 3

If you see LATE CONSENT

First check whether the late Google tag uses Google tag gateway (GTG); see /docs/google-tag-gateway#verify. If it does, follow the GTG guide (advanced consent mode with Data Transmission Controls and Global Consent Defaults, or GTM via GTG, or manual GTG). If it does not, put the COKIQ script first in <head> without async or defer, or fire the COKIQ GTM template on the Consent Initialization - All Pages trigger.

Step 4

Compare with the demo

Open cokiq.com/demo/consent-mode/advanced?cokiq_debug=1 to see a correct report next to your own.

Implementation checklist

  • Console shows "OK: COKIQ set the consent default before any Google tag ran"
  • Default lists ad_storage, analytics_storage, ad_user_data, ad_personalization as denied (or granted outside the banner regions)
  • An update appears after Accept, Reject or Save
  • Google hits carry gcs=G100 before consent and gcs=G111 after Accept All (advanced mode)
  • Debug mode switched off again in the dashboard

FAQ

Does debug mode change what is sent to Google?

No. It only reads the page state and writes to the console.

Can I send the report to support?

Yes. Copy the "Report" object from the console (or the output of Cokiq.debugReport()) into your email to support@cokiq.com.