-
Notifications
You must be signed in to change notification settings - Fork 343
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
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4c0f10d
edits
stayseesong 24447ca
[netlify-build]
stayseesong 14e4f75
Update index.md
stayseesong fafb151
edits [netlify-build]
stayseesong b906d63
Update src/connections/destinations/catalog/actions-google-analytics-…
stayseesong ce15476
Apply suggestions from code review
stayseesong 352100e
Update src/connections/destinations/catalog/personas-display-video-36…
stayseesong 0ebf6f1
[netlify-build]
stayseesong 9d5e05e
Update src/connections/destinations/catalog/google-ads-classic/index.md
stayseesong 1502e9a
consent mode info blurb
stayseesong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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.' | ||
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"%} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. | ||
|
@@ -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. | ||
> | ||
|
@@ -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 | ||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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