Kukie's banner script includes a built-in debug mode that prints a detailed Consent Mode report to the browser console. It shows which Google tags were detected on the page, whether gtag('consent', 'default', ...) fired before those tags, the current runtime consent state, and a pass/fail verdict with actionable next steps. This article walks through how to activate the debug mode and how to interpret each section of its output, including the common "late consent" FAIL verdict.
How to activate
There are two ways to enable the Consent Mode debug report:
- URL parameter (recommended): append
?kukie_debug=1to any page on a site where Kukie is installed. For example,https://example.com/?kukie_debug=1orhttps://example.com/pricing?kukie_debug=1. - Embedded config override: set
window.__KUKIE_CONFIG__.debug = truebefore Kukie's banner script loads. This is mainly useful when you want to ship a debug build to a staging environment without URL parameters.
Open the browser console (F12 on Windows/Linux, Cmd+Option+I on macOS) and reload the page. Approximately 1.5 seconds after initialisation, the debug report is printed under a collapsible group titled [Kukie] Consent Mode Debug Report.
Tip: The 1.5-second delay gives Google tags time to push their first events into the
dataLayer. If you open DevTools after the report has already printed, reload the page with DevTools open to capture it.
What the debug report shows
The report is divided into four sections:
- Detected Google tags and their DOM position. Kukie walks
document.scriptsand reports every Google tag it finds, flagging each tag that sits before the Kukie script in the HTML source with an amber warning icon. - Timing check verdict. One of
PASS,FAIL,no default, orunknown, based strictly on the order of events inwindow.dataLayer. - Current runtime consent state. Read directly from Google's internal consent store (
google_tag_data.ics.entries). Shows all four required Consent Mode v2 types plus any secondary types in use. - Summary with actionable next steps. A plain-language verdict and, where relevant, links to follow-up documentation.
Interpreting the late-consent FAIL verdict
If the debug report shows ✗ FAIL - Google tags fired BEFORE Kukie set consent defaults, it means at least one Google tag started executing before gtag('consent', 'default', ...) was called. When Data Transmission Controls or Global Consent Defaults are enabled on your Google tag, this ordering causes measurement data to be dropped or modelled incorrectly.
Before moving any scripts, first check whether the flagged tag has adopted Google Tag Gateway (GTG). GTG changes where the tag loads from but not when consent signals are sent. The correct fix is different depending on whether GTG is in use.
Step 1: Check the tag's loading origin
- Open the Network tab in DevTools.
- Reload the page with the network recorder active.
- Locate the flagged Google tag request. If the debug report already printed the tag's
src, match it against the Network tab entry. - Inspect the hostname of the script URL.
If the hostname is googletagmanager.com
The tag loads the standard way directly from Google. See the "Standard late-consent fix" section below.
If the hostname is a first-party subdomain of your own site
Examples: cdn.example.com/gtag/js?id=G-XXXX or analytics.example.com/gtm.js?id=GTM-XXXX. The tag is loaded via Google Tag Gateway. GTG-specific guidance applies before any changes to tag positions.
See our Google Tag Gateway integration guide for the correct fix sequence.
Standard late-consent fix
When the flagged tag loads from googletagmanager.com, move the Kukie script above every Google tag snippet in your <head>:
<head>
<!-- Kukie.io CMP FIRST -->
<script src="https://cdn.kukie.io/s/{your-site-key}/c.js" async></script>
<!-- Google tags AFTER Kukie -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
</head>
Replace {your-site-key} with the site key from the Kukie dashboard, and G-XXXXXXXXXX with your Google tag ID.
After updating your page, reload with ?kukie_debug=1 and verify the timing check now shows ✓ PASS.
Other common debug report outcomes
? Unable to determine timing
Either no Google tags are installed on the page, or the dataLayer has not received any activity yet. This is not a failure; it simply means there is nothing to evaluate. If you expected Google tags to be present, verify that they are installed correctly and that the page has finished loading. For asynchronously injected tags (including some Google Tag Gateway deployments), reload and wait a few seconds before checking the report again.
✗ FAIL - No consent default command detected
Kukie did not issue a gtag('consent', 'default', ...) command. This almost always means Google Consent Mode v2 is disabled for the site in the Kukie dashboard. Open Banner Editor > Integrations, enable the Google Consent Mode v2 toggle, and save. For CDN bundles, the bundle must be regenerated for the change to take effect; this happens automatically on save.
✓ PASS - Kukie set consent defaults BEFORE Google tags fired
Your setup is working correctly. Consent Mode v2 signals are being delivered to Google tags in the correct order. You may also see a note saying a Google tag is positioned before the Kukie script in the HTML source: this is shown as a recommended optimisation, not a failure, because the runtime timing check is authoritative.
Dedicated Support
If the debug report does not resolve your issue, email our dedicated Google client support path at google-support@kukie.io with your debug mode console output. Include:
- The URL where the debug report was captured
- A screenshot or paste of the full console output (with the Consent Mode Debug Report header)
- Whether the affected Google tag is loaded via Google Tag Gateway (see how to verify GTG enrollment)
Our target response time for Google Consent Mode issues is within 1 business day.
Related guides
- Google Consent Mode v2 overview
- Basic vs Advanced Consent Mode
- Google Tag Gateway (GTG) integration
- Google's Banner Requirements for Consent Mode