You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/privacy/configure-consent-management.md
+16-25Lines changed: 16 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ hidden: true
5
5
> info "Consent Management is in private beta"
6
6
> This means that Consent Management features are in active development, and some functionality may change before it becomes generally available. [Contact Segment](https://segment.com/help/contact/){:target="_blank"} with any feedback or questions.
7
7
8
-
After setting up a third-party consent management platform (CMP), you can enforce the consent collected from your users by configuring consent categories in your your Segment workspace and adding the [consent object](/docs/privacy/consent-management/#consent-object) to your web libraries.
8
+
After setting up a third-party or bespoke consent management platform (CMP), you can enforce the consent collected from your users by adding the [consent object](/docs/privacy/consent-management/#consent-object) to your web libraries.
9
9
10
-
Once you've configured consent in the Segment app and updated your libraries with the consent wrapper, your events are routed only to the categories your end users consented to share data with.
10
+
Once you've configured consent in the Segment app and updated your sources to contain consent preference in every event, your events are routed only to the categories your end users consented to share data with. Events without the consent preference will continue to flow to destinations without consent enforcement
11
11
12
12
## Prerequisites
13
13
@@ -17,7 +17,7 @@ Once you've configured consent in the Segment app and updated your libraries wit
17
17
Before you can configure consent in Segment, take the following steps:
18
18
-**Set up your third-party consent management tool and create consent categories**. Take note of your consent categories and the key or ID associated with each category.
19
19
-**Know how your company uses each destination**. You need to know which destinations to map to each category.
20
-
-**Access to your web and mobile libraries**. After you set up consent categories in the Segment app, you need to add a wrapper to your Analytics.js, Swift, or Kotlin libraries so that Segment can receive your end users' preferences. Segment provides an [Analytics.js, Kotlin, or Swift wrapper for OneTrust](#step-2-add-the-consent-wrapper-to-analyticsjs), or if you're using a different CMP, you can create your own wrapper using the [instructions provided in the analytics-next repository](https://github.com/segmentio/analytics-next/tree/master/packages/consent/consent-tools){:target="_blank”} and for your mobile libraries using the [instructions provided in the mobile-consent repository](link.com){:target="_blank”}.
20
+
-**Access to your web and mobile libraries**. After you set up consent categories in the Segment app, you need to integrate your CDP and your Segment sources using a wrapper or other solution.
21
21
22
22
<!-- TODO: fix above link to mobile consent repository-->
23
23
@@ -26,7 +26,7 @@ Before you can configure consent in Segment, take the following steps:
26
26
> info "Limited availability of sources and destinations during private beta"
27
27
> During private beta, you can send events from web sources to consent categories. Enforcement of consent preferences is only available for data lakes, warehouses, event streaming destinations, webhooks, and functions. You can map one data lake, warehouse, event streaming destination, webhook, or function to multiple consent categories. All other source and destination types are not impacted by consent mappings.
28
28
>
29
-
> Blob storage, RETL, and Engage destinations do not enforce consent preferences.
29
+
> AWS S3, RETL, and Engage destinations do not enforce consent preferences.
30
30
31
31
1. From the [Segment homepage](https://app.segment.com/goto-my-workspace/){:target="_blank”}, select the Privacy tab and click **Consent Management**.
32
32
2. On the Consent management page, click **Create categories**.
@@ -39,32 +39,23 @@ Before you can configure consent in Segment, take the following steps:
39
39
5. Once you've finished setting up your category or categories, click **Save**.
40
40
41
41
> warning "Segment recommends mapping all destinations to a category"
42
-
> Segment assumes all destinations without a mapping do not require user consent and will receive all events containing a consent object.
42
+
> Segment assumes all destinations without a mapping do not require user consent and will receive all events containing a consent object. If a destination is mapped to multiple categories, a user must consent to all categories to for data to flow to the destination.
43
43
44
-
## Step 2: Add a consent wrapper to your library
44
+
## Step 2: Integrating your CMP with Segment
45
45
46
-
You can add a consent wrapper to your analytics-js, Swift, and Kotlin libraries.
46
+
Once you've created consent categories in the Segment app, you need to integrate your CMP with Segment. Segment recommends using a CMP wrapper, but you can use any solution provided it meets the following criteria:
47
+
- Reads the end user consent preference from your CMP and includes the consent object in every event
48
+
- Generates the Segment Consent Preference Track event every time a user provides or updates their consent preferences with their anonymousId and userId
47
49
48
-
If you'd like to add the consent wrapper to a [mobile library](/docs/connections/sources/catalog/#mobile) that is not Swift or Kotlin, you must generate your own plugin. You can use the [Swift](TODO: ADD LINK) and [Kotlin](https://github.com/segment-integrations/analytics-kotlin-consent/blob/main/README.md#getting-started){:target="_blank"} plugins as an example.
50
+
Segment provides a OneTrust wrapper for the following sources:
51
+
-**Analytics.js**: Please follow the instructions from the README in the [@segment/analytics-consent-wrapper-onetrust repository](https://github.com/segmentio/analytics-next/tree/master/packages/consent/consent-wrapper-onetrust){:target="_blank"}.
52
+
-**Kotlin**: Please follow the instructions from the README in the [@segment-integrations/analytics-kotlin-consent](https://github.com/segment-integrations/analytics-kotlin-consent/blob/main/README.md#getting-started){:target="_blank"} repository.
53
+
-**Swift**: Please follow the instructions from the README in the [@repository](){:target="_blank"}. <!--- TODO: Replace this with the real instructions when I have them -->
49
54
50
-
> info "Consent Management is not backwards compatible with Segment's legacy iOS and Android libraries"
51
-
> If you are using one of Segment's legacy mobile libraries (iOS or Android,) you will need to upgrade to [Swift](/docs/connections/sources/catalog/libraries/mobile/apple/migration/) or [Kotlin](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/migration/) before using Consent Management.
52
-
53
-
<!--- TODO: replace above link with accurate Swift wrapper link when I have it -->
54
-
55
-
### Analytics.js
56
-
57
-
Please follow the instructions from the README in the [@segment/analytics-consent-wrapper-onetrust repository](https://github.com/segmentio/analytics-next/tree/master/packages/consent/consent-wrapper-onetrust){:target="_blank"}.
58
-
59
-
### Swift
55
+
If you'd like to integrate with any other CDP, Segment requires you to build your own wrapper or use any mechanism provided it meets the above requirements of data and event generation.
60
56
61
-
<!--- TODO: Replace this with the real instructions when I have them -->
62
-
63
-
Please follow the instructions from the README in the [@segment/analytics-consent-wrapper-onetrust repository](https://github.com/segmentio/analytics-next/tree/master/packages/consent/consent-wrapper-onetrust){:target="_blank"}.
64
-
65
-
### Kotlin
66
-
67
-
Please follow the instructions from the README in the [@segment-integrations/analytics-kotlin-consent](https://github.com/segment-integrations/analytics-kotlin-consent/blob/main/README.md#getting-started){:target="_blank"} repository.
57
+
> warning "Consent Management is not backwards compatible with Segment's legacy iOS and Android libraries"
58
+
> If you are using one of Segment's legacy mobile libraries (iOS or Android,) you will need to upgrade to [Swift](/docs/connections/sources/catalog/libraries/mobile/apple/migration/) or [Kotlin](/docs/connections/sources/catalog/libraries/mobile/kotlin-android/migration/) before using Consent Management.
Copy file name to clipboardExpand all lines: src/privacy/consent-management.md
+23-12Lines changed: 23 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,9 @@ Segment works with your third-party consent management platform (CMP) or bespoke
14
14
15
15

16
16
17
-
After a user sets their consent preferences, Segment captures them with a wrapper for your mobile and web libraries and updates the [consent object](#consent-object). The events are then sent downstream to any destinations in categories that an end user consented to share data with.
17
+
After a user sets their consent preferences on your website or mobile app, Segment requires you to add the [consent object](#consent-object) to all events. If you are using OneTrust, Segment provides a wrapper for your mobile and web libraries that can add the consent object to your events. If you are using another CMP, you are required to add the consent object to your events by creating your own wrapper. For more information, see the [Configure Consent Management documentation](/docs/privacy/configure-consent-management).
18
+
19
+
The events, stamped with the consent object, are then sent downstream to any destinations in categories that an end user consented to share data with.
18
20
19
21
> info ""
20
22
> Segment collects consent for both registered users and anonymous users.
@@ -27,7 +29,7 @@ Segment requires every event from all of your sources to include the end-user co
27
29
{
28
30
"context": {
29
31
"consent": {
30
-
"consentPreferences": {
32
+
"categoryPreferences": {
31
33
"Advertising": true,
32
34
"Analytics": false,
33
35
"Functional": true,
@@ -39,14 +41,21 @@ Segment requires every event from all of your sources to include the end-user co
39
41
40
42
```
41
43
42
-
The categories consented to by a user and a flag if a [consent conflict](#reconcile-consent-conflicts) exists are pulled from the consent object and are visible as traits on a user's profile in Unify.
44
+
<!-- Not currently in scope The categories consented to by a user and a flag if a [consent conflict](#reconcile-consent-conflicts) exists are pulled from the consent object and are visible as traits on a user's profile in Unify.-->
43
45
44
46
## Enforce consent
45
-
Segment routes events with a consent object to the destinations in categories consented to by a user and to destinations that do not have a consent category.
47
+
Segment routes events with a consent object to the destinations in categories consented to by a user and to destinations that do not have a consent category. Segment requires the use of the [Segment Consent Preference event](#segment-consent-preference-event) to route events to Unify and Engage.
48
+
49
+
If you are using Segment's OneTrust consent wrappers, Segment automatically generates a Segment Consent Preference event.
50
+
51
+
If you do not use OneTrust as your CMP and you only use Segment Connections, you do not have to generate a Segment Consent Preference event.
46
52
47
-
If an end user consents for the first time or changes the categories they consent to (or if they consent using a different device or identifier,) Segment generates a **Segment Consent Preference** event.
53
+
If you use Unify and Engage in your Segment instance, you must generate the Segment Consent Preference event, regardless of what consent management solution you use.
48
54
49
-
For example, if a user agreed to share their information with you for all categories on their first visit to your site, and then on their next visit to the site only consented to sharing data for functional and advertising purposes but not for analytics or data sharing, a [Track call](/docs/connections/spec/track/) demonstrating their new consent preferences would have the following format:
55
+
### Segment Consent Preference event
56
+
If an end user consents for the first time or changes the categories they consent to, Segment requires you to generate a **Segment Consent Preference** Track event. This event is automatically generated if you are using one of Segment's [OneTrust consent wrappers](/docs/privacy/configure-consent-management/#step-2-add-the-consent-wrapper-to-analyticsjs), or you can generate it using a wrapper you created on your own.
57
+
58
+
For example, if an end user agreed to share their information for functional and advertising purposes but not for analytics or data sharing, the Segment Consent Preference [Track call](/docs/connections/spec/track/) demonstrating their new consent preferences would have the following format:
50
59
51
60
```json
52
61
{
@@ -61,17 +70,19 @@ For example, if a user agreed to share their information with you for all catego
61
70
"timestamp": "2023-01-01T00:00:00.000Z",
62
71
"context": {
63
72
"consent": {
64
-
"consentPreferences" : {
65
-
"Advertising": true,
66
-
"Analytics": false,
67
-
"Functional": true,
68
-
"DataSharing": false
69
-
}
73
+
"categoryPreferences" : {
74
+
"Advertising": true,
75
+
"Analytics": false,
76
+
"Functional": true,
77
+
"DataSharing": false
78
+
}
70
79
}
71
80
}
72
81
}
73
82
```
74
83
84
+
If you use Protocols, the Segment app automatically adds the Segment Consent Preference Track event to all your existing Tracking Plans and for every new Tracking Plan. Segment recommends you don’t delete or edit the default fields in the Segment Consent Preference Track events, but you can add new fields as needed.
85
+
75
86
> info "Segment Consent Preference is a reserved event name"
76
87
> Segment has standardized a series of reserved event names that have special semantic meaning and maps these events to tools that support them.
0 commit comments