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
> info "Consent Management is currently in private beta"
5
5
> This means that the 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.
6
-
>
7
-
> During the private beta, Consent Management only supports website sources and event streaming destinations. All other sources and destinations are not impacted.
8
6
9
-
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. After you've configured consent in the Segment app, your events will be routed only to those streaming destinations consented to by your users.
10
-
11
-
<!--- note to include: how to find your category ID in tools other than onetrust-->
12
-
<!--- Folks need to do some prereq setup, there are two docs - read through and setup ourselves before including information -->
7
+
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. After you've configured consent in the Segment app, your events are routed only to destinations consented to by your users.
13
8
14
9
## Prerequisites
15
10
16
11
Before you can configure consent in Segment, take the following steps:
17
-
-**Access your consent management tool and set up consent categories**. You need a list of your consent categories and the key or ID associated with each topic.
18
-
-**Know how your company maps each destination**. You need to know which destinations map to which categories.
19
-
-**Update your web libraries with the consent object**. You need access to your web libraries so you can include the consent object in every event.
12
+
-**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 topic.
13
+
-**Know how your company uses each destination**. You need to know which destinations to map to each category.
14
+
-**A way to update your web libraries with the consent object**. After you set up consent categories in the Segment app, you need to add the Analytics.js snippet to your web libraries so that Segment can receive your end users' preferences.
20
15
21
-
## Step 1: Create consent categories
16
+
## Step 1: Add the analytics-consent-tools package to Analytics.js
22
17
23
-
<!-- Add note that category ID is case sensitive--->
18
+
Before you can create consent categories in the Segment app, you must add the consent tools to your Analytics.js library. For more information about Analytics.js, see the [Analytics.js documentation](/docs/connections/sources/catalog/libraries/website/javascript/).
24
19
25
-
1. From the [Segment homepage](https://app.segment.com/goto-my-workspace/){:target="_blank”}, select the Privacy tab and click **Consent Management**.
26
-
2. On the Consent management page, click **Get started**.
27
-
3.
20
+
Install the `analytics-consent-tools` using either a [snippet](#snippet-users) or [npm](#npm-library-users).
21
+
22
+
### Snippet users (window.analytics)
23
+
24
+
To install the package, run the following code in your project:
If you're using OneTrust, you can install the OneTrust consent wrapper using a [snippet](#for-snippet-users-windowanalytics) or [npm](#for-npm-library-users).
## Step 2: Create consent categories in the Segment app
104
+
105
+
> info "Limited availability of sources and destinations during private beta"
106
+
> During the private beta, you can send events from web sources to consent categories. Enforcement of consent preferences is only available for event streaming destinations, webhooks, and functions. All other sources and destinations are not impacted by consent mappings.
107
+
108
+
1. From the [Segment homepage](https://app.segment.com/goto-my-workspace/){:target="_blank”}, select the Privacy tab and click **Consent Management**.
109
+
2. On the Consent management page, click **Create categories**.
110
+
3. Confirm that you have completed the required prerequisites, and click **Next**.
111
+
4. On the Create consent categories page, add the following information to the category form:
112
+
-**Category name**: Enter a name that describes your use case for the data sent to this destination
113
+
-**Category ID**: In OneTrust, this is a string of up to five alphanumeric characters. Other CMPs may have a different format. This field is case sensitive.
114
+
-**Mapped destinations**: Select one or more of your destinations to map to this category.
115
+
<br/><br/>**Optional**: Click **Add category** to create another category. You can map one destination to multiple categories.
116
+
5. Once you have finished setting up your category or categories, click **Save**.
31
117
32
-
<br/>
33
118
> warning "Segment recommends mapping all destinations to a category"
34
-
> Any destination that doesn't have a mapping won't receive events with a consent object.
119
+
> For more fine-grained control of your end user consent, Segment recommends that you map all destinations to a consent category.
120
+
>
121
+
> Any destinations without a mapping will receive all events containing a consent object.
35
122
36
123
37
124
## Step 3: Add the consent object to your web libraries
38
125
39
-
40
126
> error "After adding the consent object to your events, your data is immediately impacted"
41
127
> If you disable a consent category, events are not sent to mapped destinations.
42
128
>
43
-
> If a destination is mapped to multiple categories, and the end user has conflicting preferences, data will be sent to the destination.
44
-
>
45
-
> If Segment receives an API call with both an integrations object and a consent object, the consent object takes preference.
129
+
> If a destination is mapped to multiple categories and the end user has conflicting preferences, data will not be sent to the destination.
46
130
47
-
## Ingesting consent data
131
+
1.
132
+
133
+
## Editing consent categories
134
+
135
+
If you need to make changes to your consent categories, you can edit them on the Consent Management page.
136
+
137
+
1. From the [Segment homepage](https://app.segment.com/goto-my-workspace/){:target="_blank”}, select the Privacy tab and click **Consent Management**.
138
+
2. On the Consent Management page, navigate to the consent category you'd like to edit and click **Edit**.
139
+
3. On the Edit consent category page, you can make changes to the consent category name, ID, and the destinations connected to a category.
140
+
4. When you have made your changes, click **Save**.
Copy file name to clipboardExpand all lines: src/privacy/consent-management.md
+34-21Lines changed: 34 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,30 +7,26 @@ related:
7
7
> info "Consent Management is currently in private beta"
8
8
> This means that the 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.
9
9
10
-
Segment works with your third-party consent management platform (CMP) to capture the categories consented to by an end user and route events to the streaming destinations in the categories consented to by a user.
11
-
12
-

13
-
14
10
When an end user visits your site, they set **consent preferences**, or make decisions about the types of data they want you to collect, use, and share. These consent preferences are typically presented as a set list of categories that describe how your company intends to use that data. Common categories include personalization, advertising, and site performance.
15
11
16
-
Segment captures and then enforces an end user's consent preferences. To collect your users' preferences, you must use a third-party CMP like OneTrust.
12
+
Segment works with your third-party consent management platform (CMP) or bespoke consent solution to capture an end user's consent preferences and enforce those preferences by routing events to the categories consented to by an end user.
13
+
14
+

17
15
18
-
After a user sets their consent preferences, Segment updates the [consent object](#consent-object) with that information. The events are then sent downstream to any streaming destinations in categories that a user consented to share data with.
16
+
After a user sets their consent preferences, Segment captures them with the [Analytics.js Consent Tools wrapper](https://github.com/segmentio/analytics-next/tree/master/packages/consent/consent-tools) and updates the [consent object](#consent-object). The events are then sent downstream to any streaming destinations in categories that a user consented to share data with.
19
17
20
18
> success ""
21
19
> Segment collects consent for both registered users and anonymous users.
22
20
23
-
If a user changes the categories they consent to or if they consent using a different device or identifier, any new events will contain the updated consent information.
24
-
25
-
<!--- rewrite above sentence. Also need to note that they need to make these changes available to Segment, new events are generated that will send updated consent--->
21
+
If a user changes the categories they consent to or if they consent using a different device or identifier, any events they generate after updating their consent preferences will contain the updated consent information.
26
22
27
-
For example:
23
+
For example, if a user agreed to share their information with you 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:
<!--- UNHIDE DURING PUBLIC BETA: Segment sends the information about their consent, using a [Track call](/docs/connections/spec/track), to your downstream destinations and storage destinations.
54
-
55
-
This will be added to the profile and used in Engage for auditing purposes. Every message is stamped with preferences.
56
-
57
-
If a **consent conflict** exists (for example, one user on two different devices consented to two different categories), Segment resolves the conflict according to the [Reconcile Consent]() documentation. --->
58
-
59
-
Consent information and a consent conflict flag are visible as traits on a user's profile in Unify.
49
+
> info "Segment Consent Preference is a reserved event name"
50
+
> Segment has standardized a series of reserved event names that have special semantic meaning and maps these events to tools that support them.
51
+
>
52
+
> See the [Semantic Events](/docs/connections/spec/semantic/) docs for more details.
60
53
61
54
## Consent object
62
55
63
56
Segment requires every event from all of your sources to include the end-user consent preferences, captured by your consent management tools or your application logic, in the form of the **consent object**. The consent object is a JSON object with the following format:
64
57
65
58
```json
66
59
{
67
-
"categoryPreferences" : {
60
+
"consentPreferences" : {
68
61
"Advertising": true,
69
62
"Analytics": false,
70
63
"Functional": true,
@@ -74,4 +67,24 @@ Segment requires every event from all of your sources to include the end-user co
74
67
75
68
```
76
69
77
-
To learn more about configuring consent management in your workspace, see the [Configure Consent Management docs](/docs/src/privacy/configure-consent-management).
70
+
The consent information and a consent conflict flag are visible as traits on a user's profile in Unify.
71
+
72
+
### Reconcile consent object and integrations object conflicts
73
+
74
+
You can add both the integrations object and the consent object to your Segment payloads for greater control over how Segment routes data to your downstream destinations.
75
+
76
+
> success " "
77
+
> For more information about the Integrations object, please see [Filtering your Segment Data](/docs/guides/filtering-data/#filtering-with-the-integrations-object).
78
+
79
+
If the consent object and integrations object have conflicting destination information, Segment routes data according to the following table:
| Not provided or empty object | Not provided or empty object | Message delivered to all enabled destinations |
84
+
| Not provided or empty object |`{facebook: true,`<br>`amplitude: false}`| Message and metadata delivered to Facebook |
85
+
|`{ad: true,` <br>`analytics: false}`<br> <br>//ad = facebook, google ads | Not provided or empty object | Message delivered to the destinations mapped to the consented category. In this case, the message would be delivered to the Ad category (Facebook and Google Ads). No data is delivered to destinations mapped to the analytics category. |
86
+
|`{ad: true,` <br>`analytics: false}`<br> <br>//ad = facebook, google ads |`{facebook: true,`<br>`amplitude: false}`| Message delivered to all ad destinations even though google-ads is not provided in the integrations object. Use metadata if provided for Facebook (the current behavior). No data is delivered to analytics destinations. |
87
+
|`{ad: true,` <br>`analytics: false}`<br> <br>//ad = facebook, google ads |`{facebook: false,`<br>`amplitude: false}`| Message delivered to all ad destinations (Google Ads) but NOT to Facebook. <br> No data delivered to analytics destinations |
88
+
|`{ad: true,` <br>`analytics: false}`<br> <br>//ad = facebook, google ads<br> //analytics = facebook, snowflake |`{facebook: false,`<br>`amplitude: false}`| Message delivered to all ad destinations (even though Facebook belongs to analytics and user is not consenting to analytics.) Use metadata if provided for Facebook (current behavior)<br>No data delivered to analytics destinations (Snowflake) |
89
+
90
+
To learn more about configuring consent management categories in your workspace, see the [Configure Consent Management documentation](/docs/src/privacy/configure-consent-management).
0 commit comments