Correctly manage Google Consent Mode V2 on WordPress
How to implement Google Consent Mode V2 with PixelYourSite
If you already have a license, learn how to upgrade it.
If you already have a license, learn how to upgrade it.
Add the Google Tag with the PixelYourSite free or paid plugin.
Manage consent with ConsentMagic. It has native integration with PixelYourSite and full support for Google Consent Mode V2. Make sure the "Google Consent Mode V2" option is turned ON on the ConsentMagic Settings page, and everything is taken care of.
Add the Google Tag with the PixelYourSite free or paid plugin.
Other consent plugins can use PixelYourSite's dedicated Google Consent mode filters.They can find our filters explained on the plugin's Consent page. You need to contact your consent provider for details.
Add the Google Tag with the PixelYourSite free or paid plugin.
Enable "Fire Google tags with consent mode granted" to send the parameters with value "granted". This assumes you don't need permission from your visitors, or that you fire the Google tag after getting permission. Suited for websites that use consent plugins that block the tag before getting visitors' consent.
Google expects websites using the Google Tag to send four consent-related parameters that will instruct them how to track, store, and use your data. A previous version of Google Consent (V1) had only two parameters. The extra two parameters were added in November 2023, resulting in the current setup (V2).
For websites with traffic coming from EU countries, these parameters are mandatory starting March 2024.
For websites with traffic from other geographic regions, the parameters are optional, depending on the local regulations, and the website privacy policy.
These is an example of the consent related code:
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
});
The website should allow its visitors to express their consent options, and update the code accordingly. This is an example of a code sent when the ad storage option is modified from “denied” to “granted”:
In this example, when a visitor lands on the site for the first time, the Google Tag is fired but instructs Google that consent is not granted for any category. The visitor agrees to ad storage, and an update command is sent to Google. The interaction with the visitor is done through a consent popup that informs about tracking and allows to express consent.
Under GDPR, visitors coming from EU countries must not be tracked without their consent. It means that when an EU visitor lands on your site for the first time, the Google Tag must have all the consent parameters sent with the value “denied“.
You need to inform them about the way you intend to track and use their data and ask their permission. If they grant you permission for one or multiple categories (analytics, marketing, personalized ads), you need to update the Google Tag accordingly.
Users have the right to change their minds at any time. This should be done in a user-friendly way. When they change their consent, you must update the Google Tag again.
If the Google Tag is fired using the PixelYourSite plugin, the easiest way to implement Google Consent Mode is our consent plugin for WordPress, ConsentMagic. ConsentMagic has native support for PixelYourSite and automatically tracks and updates Google Consent parameters.
Enable the “Google Consent Mode V2” option on the ConsentMagic Settings page.
If you use a different consent plugin, they can use PixelYourSite’s dedicated filters to instruct the plugin about the visitor’s Google Consent options. You must check with the consent plugin’s developers if they already do it.
Alternatively, you can use a consent plugin that blocks the tag until consent is expressed. In this scenario, PixelYourSite can be configured to always fire the Google Tag with a “granted” value for the consent parameters. Go to the Google Tags Settings page, and enable “Fire Google tags with consent mode granted”.
Testing Google Consent mode is easy with tagassistant.google.com
Open your site, and look for the Consent tab. I will show you all the details you need. Change your consent options and check if the changes are reflected in the tag.
PRO TIP: test your website in an incognito window.
The Clickthrough feature in PixelYourSite allows Google to track user interactions via URL parameters (click client ID and session ID) even when cookies are denied. This ensures data collection while respecting user consent.
© PixelYourSite.com. This site is managed by Minimal Work SRL, RO35964491, J38/337/14.04.2016, Bujoreni, Olteni 145, Valcea, Romania