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
6
> 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
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.
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.
9
+
10
+
Once you've configured consent in the Segment app, your events are routed only to the categories your end users consented to share data with.
8
11
9
12
## Prerequisites
10
13
11
14
Before you can configure consent in Segment, take the following steps:
12
15
-**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
16
-**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.
15
-
16
-
## Step 1: Add the analytics-consent-tools package to Analytics.js
17
-
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/).
19
-
20
-
Install the `analytics-consent-tools` using either a [snippet](#snippet-users) or [npm](#npm-library-users).
17
+
-**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 receives your end users' preferences.
21
18
22
-
### Snippet users (window.analytics)
19
+
##Step 1: Create consent categories in the Segment app
23
20
24
-
To install the package, run the following code in your project:
To install the package using npm, run the following code in your project:
21
+
> info "Limited availability of sources and destinations during private beta"
22
+
> 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. You can map one event streaming destination, webhook, or function to multiple consent categories. All other source and destination types are not impacted by consent mappings.
1. From the [Segment homepage](https://app.segment.com/goto-my-workspace/){:target="_blank”}, select the Privacy tab and click **Consent Management**.
25
+
2. On the Consent management page, click **Create categories**.
26
+
3. Confirm that you have completed the required prerequisites, and click **Next**.
27
+
4. On the Create consent categories page, add the following information to the category form:
28
+
-**Category name**: Enter a name that describes your use case for the data sent to this destination
29
+
-**Category ID**: In OneTrust, this is a string of up to five alphanumeric characters, but other CMPs may have a different format. This field is case sensitive.
30
+
-**Mapped destinations**: Select one or more of your destinations to map to this category. Category mappings apply to all instances of a destination.
31
+
<br/><br/>**Optional**: Click **Add category** to create another category.
32
+
5. Once you have finished setting up your category or categories, click **Save**.
55
33
56
-
exportconst analytics =newAnalyticsBrowser()
34
+
> warning "Segment recommends mapping all destinations to a category"
35
+
> For more fine-grained control of your end user consent, Segment recommends that you map all destinations to a consent category.
36
+
>
37
+
> Any destinations without a mapping are assumed to not require user consent and will receive all events containing a consent object.
57
38
58
-
withCmp(analytics)
39
+
## Step 2: Add the consent wrapper to Analytics.js
59
40
60
-
analytics.load({
61
-
writeKey: '<MY_WRITE_KEY'>
62
-
})
63
-
```
41
+
If you're using OneTrust as your CMP, you can install the OneTrust integration consent wrapper (`@segment/analytics-wrapper-onetrust`) using a [snippet](#onetrust-for-snippet-users-windowanalytics) or [npm](#onetrust-for-npm-library-users).
64
42
65
-
### Install the OneTrustconsent wrapper
43
+
If you have a CMP other than OneTrust, you can install the `@segment/analytics-consent-tools` package using the [instructions in the analytics-next repository](https://github.com/segmentio/analytics-next/tree/master/packages/consent/consent-tools){:target="_blank”}.
66
44
67
-
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).
45
+
> error "After adding the consent object to your events, your data is immediately impacted"
46
+
> If you disable a consent category, end user consent preferences for that category will not be enforced.
47
+
>
48
+
> If a destination is mapped to more than one other consent category, and an end user's consent preferences is "false" for either category, data will not get sent.
49
+
>
50
+
> If an event includes both an integrations object and a consent object, Segment will look at the consent object first, and then take into account the integrations object.
## 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**.
117
-
118
-
> warning "Segment recommends mapping all destinations to a category"
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.
122
-
123
-
124
-
## Step 3: Add the consent object to your web libraries
125
-
126
-
> error "After adding the consent object to your events, your data is immediately impacted"
127
-
> If you disable a consent category, events are not sent to mapped destinations.
128
-
>
129
-
> If a destination is mapped to multiple categories and the end user has conflicting preferences, data will not be sent to the destination.
130
-
131
-
1.
82
+
> warning "Events may be generated while the Analytics.js SDK loads"
83
+
> "Any events generated before the Analytics.js SDK is loaded fully may be lost."
132
84
133
85
## Edit consent categories
134
86
@@ -139,14 +91,23 @@ If you need to make changes to your consent categories, you can edit them on the
139
91
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
92
4. When you have made your changes, click **Save**.
141
93
142
-
## View discarded events
94
+
## Disable consent categories
95
+
96
+
Disabling a consent category means that Segment no longer enforces end user consent preferences for the destinations in the disabled category. Other consent categories are not affected. You can't delete a category.
97
+
98
+
1. From the [Segment homepage](https://app.segment.com/goto-my-workspace/){:target="_blank”}, select the Privacy tab and click **Consent Management**.
99
+
2. On the Consent Management page,
100
+
101
+
<!--- Fix this section when it no longer throws an error --->
102
+
103
+
## Consent Observability
143
104
144
-
You can view events that were discarded due to consent preferences in your [Tracking Plan](/docs/protocols/tracking-plan/create/) and in [Delivery Overview](/docs/connections/delivery-overview/).
105
+
You can view consent preference events in your [Tracking Plan](/docs/protocols/tracking-plan/create/) and view discarded events in [Delivery Overview](/docs/connections/delivery-overview/).
145
106
146
107
### Tracking Plan
147
108
148
-
<!-- ask for more context on this. "Events that are discarded due to consent preferences are surfaced in Protocols as a new Tracking Plan. While you can edit this Tracking Plan, Segment recommends leaving it intact" <!---why??--->
109
+
<!---Ask Atit--->
149
110
150
111
### Delivery Overview
151
112
152
-
Events discarded due to consent preferences appear in Delivery Overview at the "Filtered at destination" step with the discard reason "Filtered by end user consent".
113
+
Events discarded due to consent preferences appear in Delivery Overview at the "Filtered at destination" step with the discard reason `Filtered by end user consent`.
Copy file name to clipboardExpand all lines: src/privacy/consent-management.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
2
title: Consent Management Overview
3
+
hidden: true
3
4
related:
4
5
- "/privacy/account-deletion/"
5
6
- "/privacy/complying-with-the-gdpr/"
@@ -51,6 +52,8 @@ For example, if a user agreed to share their information with you for functional
51
52
>
52
53
> See the [Semantic Events](/docs/connections/spec/semantic/) docs for more details.
53
54
55
+
To learn more about configuring consent categories in your workspace, see the [Configure Consent Management documentation](/docs/src/privacy/configure-consent-management).
56
+
54
57
## Consent object
55
58
56
59
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:
@@ -67,7 +70,7 @@ Segment requires every event from all of your sources to include the end-user co
67
70
68
71
```
69
72
70
-
The consent information and a consent conflict flag are visible as traits on a user's profile in Unify.
73
+
A consent conflict flag and the categories consented to by a user are both pulled from the consent object and are visible as traits on a user's profile in Unify.
71
74
72
75
### Reconcile consent object and integrations object conflicts
73
76
@@ -85,6 +88,4 @@ If the consent object and integrations object have conflicting destination infor
85
88
|`{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
89
|`{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
90
|`{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).
91
+
|`{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) |
0 commit comments