Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Consent Mode [DOC-839] #6164

Merged
merged 10 commits into from
Mar 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Segment's integration with DV360 enables Segment customers to sync audiences cre
> info ""
> Since the release of `analytics-ios` version 4, Segment no longer collects IDFA automatically. To collect and pass IDFA to your DV360 integration, follow the steps for Ad Tracking and IDFA in the [Analytics-iOS mobile source](/docs/connections/sources/catalog/libraries/mobile/ios#ad-tracking-and-idfa) documentation.

> info "Consent mode"
> Google is enforcing consent starting March 6, 2024 for European Economic Area (EEA) users. Learn more about [consent mode](/docs/connections/destinations/catalog/actions-display-video-360/#consent-mode) and how to set it up.

## Details

> info ""
Expand Down Expand Up @@ -137,6 +140,15 @@ Segment is disabling all existing Personas Display and Video 360 destinations. Y
<img width="799" alt="image" src="https://github.com/segmentio/segment-docs/assets/89420099/37022665-a39e-4696-a23a-97bcafd9cecf">


## Consent mode
[Consent mode](https://support.google.com/analytics/answer/9976101?hl=en){:target="_blank"} is a feature provided by Google in the context of its products, particularly the Gtag library and Google Analytics. As of March 6, 2024, Google announced that consent mode must function for European Economic Area (EEA) users, otherwise data from EEA users won't process.

Consent mode in the Gtag library and Google Analytics is designed to help website owners comply with privacy regulations, such as the General Data Protection Regulation (GDPR) in the European Union. It allows website owners to adjust how these tools use and collect data based on user consent.

With consent mode, you can configure your website to dynamically adjust the tracking behavior of the Gtag library and Google Analytics based on the user's consent status. If a user provides consent to data processing, both the Gtag library and Google Analytics can collect and use that data for analysis. If a user doesn't provide consent, both tools limit data collection to essential functions, helping businesses respect user privacy preferences.

Segment automatically sends consent as `TRUE` for this destination. Segment uses the [bulk-uploader workflow](https://developers.google.com/authorized-buyers/rtb/bulk-uploader#workflow){:target="_blank"} which requires consented data. Ensure all audiences and journeys are connected to consented audiences.

## FAQ
### What is Segment's relationship with Google DV360 and is the data that Segment sends considered to be First or Third party?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ versions:

When you have Segment installed, you can use your existing tracking implementation to fulfill your data collection needs with Google Analytics 4. When you enable the Google Analytics 4 Web destination, Segment loads the [gtag.js library](https://support.google.com/analytics/answer/9310895?hl=en#zippy=%2Cin-this-article){:target="_blank"} for you. To avoid duplicate data, remove the native gtag.js script from your page.

> info "Consent Mode"
> Segment is currently building Consent Mode for all affected Google destinations. This will be available before March 6, 2024.

> info "Consent mode"
> Google is enforcing consent starting March 6, 2024 for European Economic Area (EEA) users. Learn more about [consent mode](/docs/connections/destinations/catalog/actions-google-analytics-4-web/#consent-mode) and how to set it up.

## Getting started

Expand Down Expand Up @@ -65,7 +64,63 @@ The automatically collected and enhanced measurement events include parameters b

### Conversion events

Some of Segment's prebuilt [Available Actions](https://segment-docs.netlify.app/docs/connections/destinations/catalog/actions-google-analytics-4-web/#available-actions) which map to Google's recommended events are automatically marked as a conversion in your Analytics dashboard. For example, when you add a "Order Completed" event, it will show up in your Analytics dashboard as "purchase" with the **Mark as conversion** toggle toggled on by default. However, for other events, such as "Add to Cart", you will need to manually toggle the **Mark as conversion** setting on in your Analytics dashboard. If you don't mark the event as a conversion, it will not show up as a conversion in your built-in reports. You can read more [about conversion events](https://support.google.com/analytics/answer/9267568?sjid=1275909514202748631-NA){:target="_blank"} in Google's docs.
Some of Segment's prebuilt [Available Actions](/docs/connections/destinations/catalog/actions-google-analytics-4-web/#available-actions) which map to Google's recommended events are automatically marked as a conversion in your Analytics dashboard. For example, when you add a "Order Completed" event, it will show up in your Analytics dashboard as "purchase" with the **Mark as conversion** toggle toggled on by default. However, for other events, such as "Add to Cart", you will need to manually toggle the **Mark as conversion** setting on in your Analytics dashboard. If you don't mark the event as a conversion, it will not show up as a conversion in your built-in reports. You can read more [about conversion events](https://support.google.com/analytics/answer/9267568?sjid=1275909514202748631-NA){:target="_blank"} in Google's docs.

## Consent mode
[Consent mode](https://support.google.com/analytics/answer/9976101?hl=en){:target="_blank"} is a feature provided by Google in the context of its products, particularly the Gtag library and Google Analytics. As of March 6, 2024, Google announced that consent mode must function for European Economic Area (EEA) users, otherwise data from EEA users won't process.

Consent mode in the Gtag library and Google Analytics is designed to help website owners comply with privacy regulations, such as the General Data Protection Regulation (GDPR) in the European Union. It allows website owners to adjust how these tools use and collect data based on user consent.

With consent mode, you can configure your website to dynamically adjust the tracking behavior of the Gtag library and Google Analytics based on the user's consent status. If a user provides consent to data processing, both the Gtag library and Google Analytics can collect and use that data for analysis. If a user doesn't provide consent, both tools limit data collection to essential functions, helping businesses respect user privacy preferences.

Consent mode may involve updates to your sources outside of Segment, such as incorporating a consent management system for consent functionality.

See [set up consent mode on websites](https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#update_consent_state){:target="_blank"} for more information.

### Set up consent mode

To enable consent mode for your Google Analytics 4 Web destination:
1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Web** destination.
2. Go to the **Settings** tab of the destination.
3. Click the toggle on for **Enable Consent Mode**.
4. Set the following fields with these values:

Field | Value
----- | ------
Default Ad Storage Consent State | Granted
Default Analytics Storage Consent State | Granted
Ad User Data Consent State | Granted
Ad Personalization Consent State | Granted

5. Use your consent management platform to prompt the visitor. Ask the visitor to grant or deny consent for the applicable types.
6. Pass the updated state as properties in the `page()` event after the next page load if you decide to change the consent defaults. For example,

```
analytics.page('Consent Update', {
'Ads Storage Consent State': 'false',
'Analytics Storage Consent State': 'false'
});
```
7. As soon as the page loads and the set configuration fires to the Google Analytics SDK, Segment issues a consent mode update command. Map the properties you defined to collect consent state changes to the Set Configurations Fields mapping. You can choose to do this from 1 of 2 options in steps 4 and 5.
1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Web destination.
2. Go to the **mappings** tab of the destination.
3. Select the mapping you want to edit.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Select the mapping you want to edit.'
3. Select the Set Configuration Mapping to edit.'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this step, it should be that they select the mapping they want to edit

4. *(Option 1)* Under the **Select mappings** section, select `Granted` for these fields:
* Ads Storage Consent State
* Analytics Storage Consent State
* Ad User Data Consent State
* Ad Personalization Consent State
You can manually select `Granted` or `Denied` from the dropdown menu for Advanced consent mode settings, and type in `granted` or `denied` for basic consent mode settings.
5. *(Option 2)* Under the **Select mappings** section, create an event variable to directly grab the value from the payload (for example, `properties.adStorageConsentState`). Ensure it translates to `granted` or `denied`. You can use an insert function to translate to `granted` or `denied`. Use the replace function if it's a string. Do this for these fields:
* Ads Storage Consent State
* Analytics Storage Consent State
* Ad User Data Consent State
* Ad Personalization Consent State

When these properties are available, they send to the `update` command.

If you have any questions setting up consent mode, reach out to [[email protected]](mailto:[email protected]).


{% include components/actions-fields.html settings="true"%}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ When you have Segment installed, you can use your existing tracking implementati
> warning ""
> Google Analytics 4 doesn't officially support a pure server-to-server integration. However, Segment monitors the capabilities of the Measurement Protocol API and updates the cloud integration accordingly to achieve a reasonable level of reporting for mutual customers. For full functionality, please see the [Google Analytics 4 Web destination](/docs/connections/destinations/catalog/actions-google-analytics-4-web/).

> info "Consent mode"
> Google is enforcing consent starting March 6, 2024 for European Economic Area (EEA) users. Learn more about [consent mode](/docs/connections/destinations/catalog/actions-google-analytics-4/#consent-mode) and how to set it up.

## Benefits of Google Analytics 4 Cloud

The Google Analytics 4 Cloud destination provides the following benefits:
Expand All @@ -40,8 +43,44 @@ To add the Google Analytics 4 Cloud destination:
5. On the **Settings** tab, enter in the [Measurement ID](https://support.google.com/analytics/answer/9539598){:target='_blank'} for web streams or the [Firebase App ID](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference?client_type=firebase#payload_query_parameters){:target='_blank'} for mobile streams. Next, enter in the API Secret associated with your GA4 stream and click **Save**. To create a new API Secret, navigate in the Google Analytics UI to Admin > Data Streams > choose your stream > Measurement Protocol > Create.
6. Follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/connections/destinations/actions/#customizing-mappings).


{% include components/actions-fields.html %}

## Consent mode
stayseesong marked this conversation as resolved.
Show resolved Hide resolved
[Consent mode](https://support.google.com/analytics/answer/9976101?hl=en){:target="_blank"} is a feature provided by Google in the context of its products, particularly the Gtag library and Google Analytics. As of March 6, 2024, Google announced that consent mode must function for European Economic Area (EEA) users, otherwise data from EEA users won't process.

Consent mode in the Gtag library and Google Analytics is designed to help website owners comply with privacy regulations, such as the General Data Protection Regulation (GDPR) in the European Union. It allows website owners to adjust how these tools use and collect data based on user consent.

With consent mode, you can configure your website to dynamically adjust the tracking behavior of the Gtag library and Google Analytics based on the user's consent status. If a user provides consent to data processing, both the Gtag library and Google Analytics can collect and use that data for analysis. If a user doesn't provide consent, both tools limit data collection to essential functions, helping businesses respect user privacy preferences.

Consent mode may involve updates to your sources outside of Segment, such as incorporating a consent management system for consent functionality.

### Set up consent mode
To enable consent mode for your Google Analytics 4 Cloud destination, you must update the **Ad User Data Consent State** and **Ad Personalization Consent State** for all mappings you want to send with consent. Consent mode supports all actions with Google Analytics 4 Cloud. You can choose from 2 options to enable consent mode for your Google Analytics 4 Cloud destination.

* **Option 1**

To enable consent mode for Google Analytics 4 Cloud destination:
1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Cloud destination.
2. Go to the **Mappings** tab of the destination.
3. Select the mapping you want to edit.
4. Under the **Select mappings** section, find **Ad User Data Consent State**.
5. Select `GRANTED` in the dropdown that corresponds to **Ad User Data Consent State**.
6. Select `GRANTED` in the dropdown that corresponds to **Ad Personalization Consent State**.

* **Option 2**

Create an event variable to directly grab the value from the payload. To do this:
1. Navigate to **Connections > Destinations** and select your Google Analytics 4 Cloud destination.
2. Go to the **Mappings** tab of the destination.
3. Select the mapping you want to edit.
4. Under the **Select mappings** section, find **Ad User Data Consent State**.
5. Select the **Event Variables** tab and create an event variable to directly grab the value from the payload. Ensure it translates to `GRANTED` or `DENIED`. You can use an insert function to translate to `GRANTED`or `DENIED` if your consent values are booleans. You can use the replace function if it's a string.
6. Repeat step 5 for **Ad Personalization Consent State**.


If you have any questions setting up consent mode, reach out to [[email protected]](mailto:[email protected]).

## Universal Analytics and Google Analytics 4

### Differences between Universal Analytics and Google Analytics 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ id: 60ae8b97dcb6cc52d5d0d5ab

The Google Ads Conversions destination enables you to upload offline conversions and conversion adjustments to Google Ads in a privacy safe way. With this server-side destination, you can upload conversions to the [Google Ads API](https://developers.google.com/google-ads/api/docs/conversions/overview){:target="_blank"} and tie them to a user's online click or phone call. In addition, you can improve the accuracy of your conversion measurement by sending conversion enhancements, restatements, and retractions.

> info "Consent mode"
> Google is enforcing consent starting March 6, 2024 for European Economic Area (EEA) users. Learn more about [consent mode](/docs/connections/destinations/catalog/actions-google-enhanced-conversions/#consent-mode) and how to set it up.

## Getting started
1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Search for “Google Ads Conversions” in the Destinations Catalog, and select the destination.
Expand All @@ -17,9 +20,6 @@ The Google Ads Conversions destination enables you to upload offline conversions
6. On the **Settings** tab, authenticate with Google using OAuth. Click **Connect to Google Ads Conversions**. Follow the prompts to authenticate using OAuth, with a Google account that is a member of your Google Ads account.
7. Follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/connections/destinations/actions/#customizing-mappings).

> info "Consent Mode"
> Segment is currently building Consent Mode for all affected Google destinations. This will be available before March 6, 2024.

> warning "Upload Enhanced Conversion (Legacy) Action Deprecation"
> Google plans to sunset the legacy API, leading to the discontinuation of the Upload Enhanced Conversions (Legacy) Action. New subscriptions using the sunsetting Upload Enhanced Conversion (Legacy) Action are **no longer possible**, but existing subscriptions will remain functional.
>
Expand Down Expand Up @@ -64,6 +64,35 @@ To migrate from Upload Enhanced Conversion (Legacy) Action to the Upload Convers
| | restatement_currency_code | Default Not Available |


## Consent mode
[Consent mode](https://support.google.com/analytics/answer/9976101?hl=en){:target="_blank"} is a feature provided by Google in the context of its products, particularly the Gtag library and Google Analytics. As of March 6, 2024, Google announced that consent mode must function for European Economic Area (EEA) users, otherwise data from EEA users won't process.

Consent mode in the Gtag library and Google Analytics is designed to help website owners comply with privacy regulations, such as the General Data Protection Regulation (GDPR) in the European Union. It allows website owners to adjust how these tools use and collect data based on user consent.

With consent mode, you can configure your website to dynamically adjust the tracking behavior of the Gtag library and Google Analytics based on the user's consent status. If a user provides consent to data processing, both the Gtag library and Google Analytics can collect and use that data for analysis. If a user doesn't provide consent, both tools limit data collection to essential functions, helping businesses respect user privacy preferences.

Consent mode may involve updates to your sources outside of Segment, such as incorporating a consent management system for consent functionality.

### Set up consent mode

To enable consent mode for your Google Ads Conversions destination, you must update the **Ad User Data Consent State** and **Ad Personalization Consent State** for all of your Upload Call Conversion and Upload Click Conversion actions. You can do this in 1 of 2 ways:

* **Option 1:**
1. Navigate to **Connections > Destinations** and select your Google Ads Conversion destination.
2. Go to the **Mappings** tab of the destination.
3. Select the mapping you want to edit.
4. In the **Select mappings** section, select `GRANTED` from the dropdown menu for **Ad User Data Consent State** and **Ad Personalization Consent State**.

* **Option 2:**
1. Navigate to **Connections > Destinations** and select your Google Ads Conversion destination.
2. Go to the **Mappings** tab of the destination.
3. Select the mapping you want to edit.
4. In the **Select mappings** section, for **Ad User Data Consent State** and **Ad Personalization Consent State**, select the **Event Variables** tab and create an event variable to directly grab the value from the payload. Ensure it translates to `GRANTED`, `DENIED`, or `UNSPECIFIED`. You can use an insert function to translate to `GRANTED`, `DENIED`, or `UNSPECIFIED` if your consent values are booleans. You can use the replace function if it's a string.

If you send `DENIED` for any of the two consent states, it results in an error and the data won't send to Google. For more information, see [FAQ about the EU user consent policy for Customer Match upload partners](https://support.google.com/google-ads/answer/14310715?hl=en){:target="_blank"}.

If you have any questions setting up consent mode, reach out to [[email protected]](mailto:[email protected]).


## FAQ and troubleshooting

Expand Down
Loading
Loading