🍪 A Google Tag Manager consent template for the Pressidium Cookie Consent WordPress plugin.
You need to install the Pressidium Cookie Consent plugin on your WordPress site and configure it to work with the GTM template.
Let’s get started by installing the Pressidium Cookie Consent WordPress plugin:
- Log in to your WordPress dashboard
- Navigate to the “Plugins” menu
- Search for “Pressidium Cookie Consent”
- Click “Install Now” and WordPress will take it from there
- Activate the plugin through the “Plugins” menu on WordPress
Alternatively, you could manually download it from its GitHub repository.
- Navigate to the “Cookie Consent” menu
- Under the “Consent Mode” tab, enable “Google Consent Mode v2 (GCM)”
- Select the “Google Tag Manager (GTM) template” option as the “Implementation”
- Click “Save”
- Navigate to the Community Template Gallery
- Search for “Pressidium Cookie Consent”
- Select the template and click “Add to workspace”
- Select the workspace where you want to add the template and click “Add”
- Click “Add” again to confirm
- Click “Submit” to save the changes
- Navigate to Google Tag Manager
- Select the workspace where you added the template
- Navigate to the “Tags” menu
- Click “New” to create a new tag
- Under “Tag Configuration”, click “Choose a tag type to begin setup”
- Select the “Pressidium Cookie Consent” template
- Configure the tag as needed
- Under the “Triggering” section, click “Choose a trigger to make this tag fire”
- Select “Consent Initialization - All Pages”
- Click “New” to create a new trigger
- Click “Save”
- Click “Submit” to save the changes
Under the “Tag Configuration” section, you can configure the following settings:
- Default consent states
- Ads data redaction
- URL passthrough
Under “Default consent states”, click “Add Row” to add a new row for each region. For each row, you can set the regions as a comma-separated list of ISO 3166-2 codes (leave blank to have your selection apply to all regions) and the default consent state for each consent type.
If two rows are set with values for a region and subregion, the one with a more specific region will take effect.
For example, if you have ad_storage
set to true
for US
, and ad_storage
set to false
for US-CA
,
a visitor from California will have the more specific US-CA
setting take effect. For this example, that would
mean a visitor from California would have ad_storage
set to false
.
Region | Ad storage | Behavior |
---|---|---|
US |
true |
Applies to all US states except California |
US-CA |
false |
Applies to California |
Unspecified | true |
Applies to all other regions |
The template allows you to set different default consent states for different regions. This is useful if you need to comply with different privacy laws in different regions.
You can set the default consent state for each consent type:
- Ad storage
- Ad user data
- Ad personalization
- Analytics storage
- Functionality storage
- Personalization storage
- Security storage
for any region by specifying its ISO 3166-2 code.
When the “Ad storage” consent type is denied, ad click identifiers sent in network requests by Google Ads and Floodlight will be redacted. Network requests will also be sent through a cookieless domain
Will pass through ad click, client ID, and session ID information in URLs.
If you’ve spotted any bugs, or would like to request additional features from this template, please open an issue.
Apache License 2.0, check the LICENSE
file.