How to Send Anonymous Data to Google Analytics 4

Overview

Follow this guide to learn how to send Anonymous Data to Google Analytics 4! You can choose to set up GA4 with consent in one of two ways. If user opts out of tracking, you can send the data to GA4 with a flag that tells google “this data should be anonymized”. Or if user opts out of tracking, you can choose to not send data to GA4.

If anonymized data is sent to GA4, you won’t see transaction IDs in reporting. However, if modeling is active in the property, Google does modeling of hits where consent is denied.

Understanding Anonymous Data and Google Analytics 4:

When consent is enabled, there may be discrepancies in the data, whether it's sent anonymously or not sent at all. With anonymous data enabled, the events are still passed but not associated with a specific user or session. The users' and sessions' related data will be modeled.

If anonymized data is sent to GA4, you won’t see Transaction IDs in reporting. However, if modeling is active in your GA4 property (reference), Google does modeling of hits where consent is denied to try and "backfill" what might otherwise be missing conversions.

👍

Learn More: Understanding GA4 Modeling with Anonymous Data for Consent Management

Read this article to learn more about GA4 Modeling with Anonymous Data for Consent Management.

Behavioral Modeling for Consent Mode:

Modeling is a method that uses anonymized data to create models of user behavior. This method is only available if you have implemented Google Consent Mode, which allows you to collect data from users who have not opted in to analytics cookies. The anonymized data is used to create models that can help with identifying users.

📘

Note: Behavioral Modeling Results

It can take a minimum of 7 days for modeling to begin after starting to send anonymous data and there is no ETA of when the modeling will be available.

👍

Learn More: Behavioral Modeling for Consent Mode

Read this article to learn more about the process of training a model in Google Analytics 4.

Read this article to learn more about behavioral modeling for Consent Mode in Google Analytics 4.

Example of Data and Reporting:

  • Scenario: In 7 days, there is a total of 100 orders in Shopify, where 50 users accepted the consent banner and 50 did not accept the consent banner.
    • When Modeling is NOT Active: The Elevar Channel Accuracy report will show that 100 orders were sent to GA4. However in GA4, there would be 50 transactions in the report.
    • When Modeling is Active: The Elevar Channel Accuracy Report will show 100 orders were sent to GA4. In GA4, if it's not a 100% match, it will be close, because GA4 backfills the numbers from users who did not accept consent and attempts to match the missing orders.
      • Note: In most cases, there will be a 95-99% match rate.

How to Send Anonymized Data to GA4

Enabled Consent Mode in the Shopify Source:

  • Access your Shopify source in the Elevar app and navigate to the "Consent Mode" step.
  • Navigate to the section of the page titled "Would you like to enable our Google Consent Mode Integration?" and click on the "Yes" button.
    • (See Figure 1)

Step 1 screenshot

_Figure 1_

👍

Learn More: Enabling Consent Mode

Read this guide for a step-by-step guide on how to enable consent in the Shopify source and how to configure the pre-built tags.

Access Google Analytics 4 Destination:

  • Once you have enabled consent in the Shopify source, use the left-hand navigation menu and click on the "My Tracking" tab.
  • Navigate to your list of destinations. Locate and click on the Google Analytics 4 destination card.
    • (See Figure 2)

Step 2 screenshot

_Figure 2_

Enable Anonymized Data:

  • Once in the Google Analytics 4 destination, locate the "Setup Steps" navigation box and click on the "Consent Mode" tab.
  • Navigate to the section of the page titled "Would you like to enable Consent Mode?" and click on the "Yes, enable for this destination" button.
  • Navigate to the section of the page titled "How would you like to send data to GA4?" and click on the "Send anonymized data" button.
  • Once you have made the required changes, be sure to save any changes by clicking on the "Save" button located at the bottom of the section. This will ensure that all server hits will always be sent to GA4 with Google’s GCS parameter and that the pre-built web tags will rely on the Built In Consent Only.
    • (See Figure 3)

Step 3 screenshot

_Figure 3_