Kjeks Google WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA
Google Consent Mode v2 for Kjeks: wires GA4 and Google Tag Manager to the visitor's Kjeks consent choices.
Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/soderlind/kjeks-google/releases/download/0.4.0/kjeks-google.zipOn Packagist as soderlind/kjeks-google:
composer require soderlind/kjeks-googleGoogle Tag Manager and Google Analytics 4 for Kjeks, wired through Consent Mode v2. Requires the Kjeks plugin.
Part of the kjeks family — an adapter over the Kjeks public API. See the kjeks ecosystem overview.
Installation
- Install and activate Kjeks first — this add-on requires it.
- Download the latest
kjeks-google.zip. - In WordPress, go to Plugins → Add New → Upload Plugin and upload the zip.
- Activate the plugin (on multisite, Network Activate it).
The plugin updates itself automatically via GitHub releases using plugin-update-checker.
How it works
Two layers keep Google inside the Kjeks consent layer (see Kjeks grilling Q7):
- Consent Mode v2 defaults are denied — before any Google code runs, the
add-on sets
ad_storage,ad_user_data,ad_personalization, andanalytics_storagetodenied. - The container is gated — the GTM/gtag container is registered with Kjeks as an inert script and only activates when the configured category is granted, so Google can never load before consent.
When the visitor changes their choice, the add-on pushes a Consent Mode
update, mapping:
| Kjeks category | Consent Mode signals |
|---|---|
analytics granted |
analytics_storage: granted |
marketing granted |
ad_storage, ad_user_data, ad_personalization: granted |
Configuration
- Network Admin → Settings → Kjeks Google — network defaults (multisite).
- Settings → Kjeks Google — per-site overrides; blank inherits the default. On a single site this is where you configure everything.
Fields: GTM container ID (GTM-XXXXXX), GA4 measurement ID (G-XXXXXXX), and
the category that must be granted before the container loads (default
analytics).
Filters
kjeks_google_config— filter the resolved{ gtm_id, ga4_id, gating_category }.
Notes and limitations
- The GTM `
Releases
4 releases. Each count is every asset in that release; expand a row for the breakdown.