WordPress setup · ACookies 1.0.1

Connect ACookies to Google tags.

Choose how Google tags load, send consent choices automatically, and verify the result on your website.

Before you start

Install ACookies 1.0.1 or later, complete setup, and enable the public banner. Open Settings → ACookies → Settings → Google integrations. Decide which installation owns each Google tag: the plugin, your theme, Site Kit, or GTM. Configure each tag once.

ACookies supports Consent Mode v2. Partner approval and a Gallery listing are separate Google review processes. The native template is currently available for manual import from the template repository.

Direct Google tag integration

  1. Keep Consent integration set to Direct Google tag.
  2. If ACookies will install GA4, enter its measurement ID. If another tool installs it, leave the plugin’s GA4 field empty.
  3. Choose basic or advanced mode below, save, and verify in Tag Assistant.

ACookies establishes denied optional consent in the page head and restores saved choices before plugin-managed measurement commands. Confirm that externally installed tags also load after the defaults.

Native Google Tag Manager integration

  1. Download template.tpl from the template repository. In GTM, open Templates → Tag Templates → New and import it.
  2. Create an ACookies Consent Mode tag. Use Consent Initialization – All Pages and fire it once per page.
  3. Leave regional rows empty for denied optional consent worldwide. If your policy needs regional defaults, add ISO 3166-2 region codes and choose each consent state. Visitor choices override these defaults; the banner remains global.
  4. In WordPress, select Native Google Tag Manager template. Enter the GTM container ID only if ACookies will load the container.
  5. In GTM Preview, check defaults, saved choices and live updates before publishing the container.

The WordPress plugin supplies the banner and early bridge. The template sends updates with GTM’s native APIs. Without the template, native-mode Google consent stays denied. Installing this adapter does not add a banner to a site without the WordPress plugin.

Read Google’s consent template guide for the native API and trigger behavior.

Basic and advanced mode

Basic, the default: leave Load Google tags before consent disabled. ACookies delays its GA4 tag until analytics consent and its GTM container until analytics or marketing consent. Externally installed tags need equivalent blocking. Configure consent checks for third-party GTM tags too.

Advanced: enable that option. Google tags load with optional consent denied and may send cookieless measurement requests before the visitor chooses. Accepting or withdrawing a category updates its signals. Switching back to basic delays plugin-managed tags on subsequent page loads.

Read Google’s basic and advanced Consent Mode explanation. Consent Mode communicates choices to Google tags; it does not determine whether a site meets a particular legal requirement.

How choices map to Google consent

ACookies choiceGoogle consent
Analyticsanalytics_storage
Marketingad_storage, ad_user_data, ad_personalization
Preferencesfunctionality_storage, personalization_storage
Required securitysecurity_storage is granted

Saved choices use the existing first-party consent cookie and local storage. With WP Consent API installed, ACookies also communicates preferences, statistics and marketing choices to participating WordPress plugins.

Verify and troubleshoot

  1. Temporarily enable Show consent debug messages on public pages in Google integrations. Open a fresh private browser session.
  2. Read the panel’s timing and native-template connection messages. It flags known earlier Google commands or script loads and links to remediation.
  3. Use Tag Assistant to verify all four core signals before choice, after Reject, after Accept, after a partial choice, on another page and after withdrawal.
  4. Compare browser cookies and network requests. Basic mode must block the relevant tags; advanced mode may send cookieless requests while consent is denied.
  5. Disable public debug messages after verification.

The debug panel observes commands and recognizable Google scripts in the current page. It cannot prove complete coverage or automatically identify every first-party gateway script. A clean panel is a starting point; confirm actual tag execution in Tag Assistant.

Late consent and Google tag gateway

Google tag gateway serves Google scripts and measurement through your own domain. A one-click CDN installation may inject tags before WordPress head hooks and reduce your control over load order. If a consent warning appears, first verify whether the affected tag uses the gateway.

  1. Check the Google tag’s gateway settings and your CDN integration.
  2. Inspect browser Sources and Network: check whether the tag script and measurement requests use the configured first-party gateway path. Compare this with the intended gateway configuration; a first-party URL alone does not prove enrollment.
  3. Review Google’s gateway setup guide and its script-serving verification instructions.

When gateway enrollment is confirmed and signals are late, Google’s CMP application guidance recommends advanced Consent Mode (“unblocked + consent”) for gateway-enabled tags. Configure Data Transmission Controls and Global Consent Defaults in the Google tag to match your policy, then verify actual signals and regional behavior. ACookies continues showing its enabled banner worldwide.

Alternatively, move the tags into a GTM container with ACookies on Consent Initialization and deploy that container through the gateway, or use a manual gateway installation that places consent setup before the script import. Verify the repaired sequence in Tag Assistant. ACookies cannot reorder scripts injected by your CDN.

Start troubleshooting with ACookies support

For missing or late Consent Mode signals, email support@acookies.com first, before contacting Google. Include the affected URL, ACookies version, direct/native integration, basic/advanced mode, screenshots and a shareable GTM Preview link.

Staffed technical support is available to all ACookies customers, including free users, with an initial technical response within four business days. Template bugs can also be reported in the template repository. Keep credentials and private consent records out of public issues.