Undefined index: server_offset_time

« Evo Parse Error »

Error : mysqli::mysqli(): (42000/1203): User emarket_emarket already has more than 'max_user_connections' active connections
Error information
ErrorType[num] WARNING[2]
File /home/emarket/public_html/manager/includes/extenders/dbapi.mysqli.class.inc.php
Line 64
Source $this->conn = new mysqli($host[0], $uid, $pwd, $dbase, isset($host[1]) ? $host[1] : null);

Basic info
REQUEST_URI http://www.emarketeers.com:443/api/head
Referer
User Agent
IP 85.92.91.22
Current time 2024-06-16 23:31:11

Benchmarks
MySQL 0.0000 s (0 Requests)
PHP 0.0414 s
Total 0.0414 s
Memory 1.7894439697266 mb

Backtrace
DocumentParser->executeParser()
index.php on line 139
DBAPI->connect()
manager/includes/document.parser.class.inc.php on line 2746
mysqli->mysqli('localhost', 'emarket_emarket', ',K@bSp$Dh[L&', 'emarket_emarketeers', 0)
manager/includes/extenders/dbapi.mysqli.class.inc.php on line 64
Jonathan Saipe

Google Consent Mode & GA4: Your Questions Answered

3 January 2024, Jonathan Saipe



Google Consent Mode
Data privacy remains one of the hot topics of discussion among digital marketing and ad tech teams. Platforms and software vendors are continually striving to find the balance between users’ privacy choices and what is acceptable in terms of data collection.

To assist with the delicate balance of privacy vs data collection, Google provides a mechanism known as Consent Mode.

But what is it? How do I implement and test it? And how does it impact my data collection and reporting in GA4? We’ve answered these questions and more below.


What is Google Consent Mode?

Launched in beta in September 2020 and officially released in November 2020, Google’s Consent Mode is designed to help website owners and advertisers manage user consent for tracking and advertising purposes in compliance with the General Data Protection Regulation (GDPR) in the European Union and the California Consumer Privacy Act (CCPA).

More specifically, Consent Mode allows website owners to adjust how Google tags behave based on the user’s consent choices.

cookiebot consent banner

When a user is presented with a cookie consent banner, their choices will communicate with Google tags. When set up correctly, Consent mode enables websites to dynamically adjust the behaviour of Google tags e.g. when running Google Analytics or Google Ads, based on a user’s consent status.

For example, if a user consents to being tracked for analytics but not for personalised advertising, Consent Mode will adjust the behaviour of relevant Google tags accordingly.


How do you implement Consent Mode?

There are a variety of ways to implement Google Consent Mode.

1. Use a Consent Management Platform

By far the easiest way is to use a Consent Management Platform (CMP), for example, Cookiebot, CookieYes or OneTrust. There are also various WordPress plugins from other vendors that will facilitate Consent Mode.

2. Use Google Tag Manager

The second option is to use Google Tag Manager (GTM) which will allow you to adjust the behaviour of Google tags and other non-Google tags based on a user’s consent preferences. Whilst no specific coding skills are required, it will require competent knowledge of GTM.

Read a detailed guide to implementing your consent configuration using GTM.

3. Write your own custom configuration

The third option is to write your own custom configuration using gtag.js. Here you will be able to set your consent default status and update the consent state when users have selected their cookie choices when presented with a consent banner.

Read a full development guide to implementing Consent Mode using gtag.


How do you test your consent settings?

Testing Google Consent Mode involves simulating different user consent scenarios to ensure that your implementation correctly communicates with your website’s tags based on consent preferences.

For example, a user might accept all cookies, deny consent entirely, or choose only to accept analytics cookies rather than marketing cookies. It’s therefore important that these user choices control how your Google (and non-Google) tags fire.

The three most common methods to test consent settings are:

  1. The Google Tag Assistant
  2. Google Tag Manager Preview Mode
  3. Chrome’s developer tools

1. Google Tag Assistant

Using the Google Tag Assistant you can test a website’s Google Consent status on a page-by-page level.

To carry out an effective test, ensure you have a. cleared your cookies for that domain before the test, and b. you haven’t selected any options when presented with the cookie consent banner.

Navigate back to Tag Assistant, select the Consent tab and select a page on the left-hand menu. You will see information about that page’s consent state, as well as more granular information about consent for ad storage or analytics storage.

The image below indicates that consent has been denied.

testing consent status with google tag assistant

Now try to accept cookies using the consent banner and observe the consent state. Has it changed?

consent granted - testing with tag assistant

2. Google Tag Manager

If you have access to Google Tag Manager, you can use the Consent Overview screen to review all of your tags and what consent is required for them to fire.

GTM consent overview showing tags with built-in consent

The Consent Overview screen will also indicate which tags have built-in consent including Google Analytics, Google Ads, Floodlight and Conversion Linked versus non-Google tags that require additional consent to be set up in GTM e.g. the Meta pixel, LinkedIn Insight tag, the X pixel, Hotjar tracking code etc.

GTM consent overview showing tags with additional consent added

As with Google Tag Assistant, you can also activate GTM preview mode to test your changes in a controlled environment.

This is very useful when working on a staging environment prior to making any changes live. It will allow you to see how your tags behave based on user consent without affecting your production website.

Simulate different consent scenarios to test how your tags respond. For example, simulate a scenario where the user gives consent for analytics but not for advertising, and vice versa. Trigger consent changes via your website’s consent management platform, GTM or manually adjusting your custom configuration.

3. Chrome DevTools

The more advanced way to check your consent state is by using Chrome developer tools (aka Chrome DevTools) to inspect network requests and verify that tags have fired or been blocked based on users’ consent choices.

Select the console tab and there you will be able to check the browser console logs for any messages related to the implementation of Consent Mode and address any issues that arise during testing. See the example below.

Using Chrome's developer tools to test consent

Aside from checking consent status, Chrome’s developer tools might highlight other reasons why your tag isn’t firing. The example below shows an error due to a Content Security Policy which will affect how a tag is firing.

Chrome console error message

For a full guide to using Chrome’s developer tools to check consent status, I recommend you read Google’s guide to verifying consent status.

Finally, don’t forget to emulate the above tests across different browsers and devices to ensure compatibility and consistent behaviour.

For gold standard best practice, document your test scenarios and results. I.e. keep a record of the different consent scenarios you tested, the expected outcomes, and the actual results. This documentation will be invaluable for future troubleshooting or testing.


How does Consent Mode work in Google Analytics 4

If Consent Mode has been correctly set up, when users deny consent, Google Analytics 4 can use behavioural modelling and conversion modelling to estimate user behaviour and conversions, plugging any gaps in your reporting.

This is carried out by machine learning to identify similar users who have granted consent and applying that learning to users who decline consent.

On a more granular level, when visitors deny consent, tags that fire won’t store cookies but they will send pings to Google, communicating basic information about user activity.

Basic information will include functional information e.g. time, user agent and referrer. It will also include aggregate or non-identifying information e.g. whether or not an ad was clicked (e.g. was GCLID or DGLID present) and what was the consent state (boolean).

When GA4 uses behavioural or conversion modelling estimates, it’ll attempt to estimate data based on user and session metrics including active users, new users, conversion rate, visitor geo-location and device category and channel attribution for conversions.


How can you see modelled data in Google Analytics 4

GA4 will seamlessly integrate modelled and observed data in your reports.

You can click on the data-quality icon at the top of your GA4 reports to see whether or not modelled data is included.

GA4 data quality icon showing estimated user data

The following table, provided by Google summarises the different types of messages you might see.

GA4 data quality icon status messages

Image Source: “[GA4] Behavioral modeling for Consent Mode”


What are the prerequisites to see modelled data in GA4?

When you access “Reporting identity” in GA4’s admin, you may notice the message: “Modeling is unavailable for this property. Once it’s available, it will be turned on by default in your reports”.

Message in reporting identity - Modeling is unavailable for this property. Once it's available, it will be turned on by default in your reports

This error will indicate that a. you haven’t set up Consent Mode correctly, or, b. you haven’t met the data thresholds for modelling to appear in your reports.

In other words, even if you have successfully set up Consent Mode, you still might not see modelled data in GA4 if you don’t meet the data thresholds.

To be eligible for modelling in GA4, your GA4 property must meet the following criteria:

  • The property collects at least 1,000 events per day with analytics_storage=’denied’ for at least 7 days i.e. visitors have denied consent for analytics storage in the cookie consent banner
  • The property has at least 1,000 daily users sending events with analytics_storage=’granted’ for at least 7 of the previous 28 days. i.e. visitors have either accepted all cookies or at least cookies relating to analytics storage

Behavioural modelling starts from the date a given property becomes eligible.

This isn’t ideal for smaller websites with limited traffic but the thresholds might change over time.

If for some reason your GA4 property no longer meets the prerequisites for modelling after having previously met them e.g. because you experienced a drop in traffic over a period of time, estimated data will no longer be available. If the property later meets the prerequisites again, estimated data will be available again.


Can I disable modelled data in GA4?

Yes absolutely. If you don’t want modelled data in your GA4 reports, you can change your reporting identity methods in admin.

Currently, GA4 admins can choose from “Blended”, “Observed” or “Device-based” reporting identities (the latter is hidden in the default view until you click “show all” bottom right).

GA4 reporting identity methods

If you want to keep modelling, leave “Blended” selected.

This will give you the option to report on visitors via their user ID (which requires manually setting up), Google Signals (which is off by default and requires activating under “Data Collection”), device ID (on by default), and then modelling if the previous 3 methods of data collection aren’t available.

If you would prefer to switch off modelling, you can select “Observed” or “Device-based”.

Bear in mind that you can switch back and forth between these options without impacting historical data. This is a good way to analyse the differences between observed and modelled data in your reports.


What is Consent Mode v2?

Google Consent Mode v2 builds on v1, with two new signals sent to Google, namely:

  • ad_user_data: does the user consent to their personal data being used for advertising purposes?
  • ad_personalization: does the user consent to their data being used for remarketing purposes?

Google Consent Mode v2

Google has been pushing for website owners – and in particular Google advertisers – to implement Consent Mode v2 by March 2024.

If you haven’t yet implemented Consent Mode v2, it’s likely that Google Ads audience building, remarketing capabilities and ad personalisation will be very much impacted, which of course will be very detrimental to your account performance and ROI.

Equally, any links between GA4 and Google Ads, in terms of the above features, will ceased to function.