**Update Sep 8**: GA4 has been enabled on Super User.

----------

**TL;DR**: We’re preparing to upgrade Google Analytics to version 4.

[A few months ago](https://meta.stackexchange.com/a/378440/1172320), the Google Analytics (GA) cookie was recategorized as a “Performance Cookie”. Users who have access to [site analytics](https://meta.stackexchange.com/help/privileges/site-analytics) saw a drop in reported page views for their respective communities. Earlier this year, Google [announced](https://support.google.com/analytics/answer/11583528?hl=en) that Universal Analytics (UA) will be going away and will stop processing new data after July 1, 2023. Our longer term solution was to migrate to the latest version of Analytics, Google Analytics 4 (GA4), which includes more privacy controls with [Consent Mode](https://support.google.com/analytics/answer/9976101?hl=en) and a default IP anonymization feature out of the box, which means that GA4 will not store the IP addresses of users.

In this post, we will provide a brief overview of the Consent Mode feature, what changes will be made, and a staged rollout plan for when the upgrade will take place across Stack Exchange network sites.

## **What is Consent Mode?**

Consent Mode is a beta feature that adjusts the behavior of Google tags based on the visitors’ consent choice of granted or denied as it relates to their use of non-essential cookies which are disabled by default. Until consent has been granted, Google will receive cookieless pings that communicate the consent state and user activity, instead of storing cookies.

These pings include some [functional and aggregate, non-identifying information](https://support.google.com/analytics/answer/9976101?hl=en) which enables Google to [fill in the data gap](https://support.google.com/analytics/answer/11161109) using machine learning to model users who decline cookies against similar users who accept cookies. What this means for us is we will be able to better understand user behavior and any other aggregate traffic data, without collecting any identifying information.

## **What changes will be made?**

We will be running our existing UA integration in parallel with GA4. We are still relying on our existing analytics to report on high-level aggregate metrics and integrating GA4 in parallel gives us time to verify the implementation and start building the historical data. The reason for this is because it is not possible to migrate our existing data from UA to GA4 due to the differences in data schema and dimension definitions.

For UA, the analytics cookie will still be classified as a “Performance Cookie”. If consent has not been provided, data will not be sent to Google Analytics. This is the current behavior and no changes have been made.

With GA4 and Consent Mode enabled, the Javascript snippet will always be loaded across the pages you visit regardless of the consent status. What this means is you will see cookieless pings to Google Analytics for each page you visit; however, data will not be stored or read from browser cookies (e.g. \_ga cookie) until consent has been granted. Your consent status will continue to persist across every page you visit. For more information about Consent Mode behaviors, please refer to Google’s [Help Center article](https://support.google.com/analytics/answer/9976101?hl=en).

For a high level overview of our existing analytics setup and what our setup will look like with GA4, please refer to the diagrams below.

**Here’s a simplified flowchart of our existing UA setup:**

[![Current Universal Analytics setup][1]][1]

**And here’s what our setup will look like when we run both UA and GA4 in parallel:**

[![Universal Analytics and Google Analytics 4 setup][2]][2]

## **Timeline**

Here’s the rollout plan, just so you know when these changes will be made:

| WHERE | WHEN | STATUS |
| --- | --- | --- |
| Super User | Week of Sep 5 (or sooner) |Live as of Sep 8|
| Network-wide | Week of Sep 12 ||

While there will not be changes to the Privacy Policy you can also expect to see some updates to our [Cookie Policy](https://stackoverflow.com/legal/cookie-policy) page in our legal portal in the near future.

If you come across any bugs related to GA, please add an answer (one answer per bug) so that we can triage and prioritize them accordingly. We’re also happy to answer any questions you may have regarding the GA4 upgrade.


  [1]: https://i.sstatic.net/hGMKN.jpg
  [2]: https://i.sstatic.net/JReU0.jpg