Skip to content

Commit 4ade071

Browse files
committed
making requested updates [netlify-build]
1 parent 7a1fd8e commit 4ade071

File tree

2 files changed

+52
-90
lines changed

2 files changed

+52
-90
lines changed
Lines changed: 47 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,55 @@
11
---
22
title: Configure Consent Management
3+
hidden: true
34
---
45
> info "Consent Management is currently in private beta"
56
> 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.
67
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.
811

912
## Prerequisites
1013

1114
Before you can configure consent in Segment, take the following steps:
1215
- **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.
1316
- **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.
2118

22-
### Snippet users (window.analytics)
19+
## Step 1: Create consent categories in the Segment app
2320

24-
To install the package, run the following code in your project:
25-
26-
```ts
27-
// wrapper.js
28-
import { createWrapper, resolveWhen } from '@segment/analytics-consent-tools'
29-
30-
export const withCMP = createWrapper({
31-
shouldLoad: (ctx) => {
32-
await resolveWhen(() =>
33-
window.CMP !== undefined && !window.CMP.popUpVisible(), 500)
34-
35-
if (noConsentNeeded) {
36-
ctx.abort({ loadSegmentNormally: true })
37-
} else if (allTrackingDisabled) {
38-
ctx.abort({ loadSegmentNormally: false })
39-
}
40-
},
41-
getCategories: () => {
42-
// e.g. { Advertising: true, Functional: false }
43-
return normalizeCategories(window.CMP.consentedCategories())
44-
}
45-
})
46-
```
47-
48-
### npm library users
49-
50-
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.
5123
52-
```ts
53-
import { withCMP } from './wrapper'
54-
import { AnalyticsBrowser } from '@segment/analytics-next'
24+
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**.
5533

56-
export const analytics = new AnalyticsBrowser()
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.
5738
58-
withCmp(analytics)
39+
## Step 2: Add the consent wrapper to Analytics.js
5940

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).
6442

65-
### Install the OneTrust consent 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”}.
6644

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.
6851
69-
#### For snippet users (window.analytics)
52+
### OneTrust for snippet users (window.analytics)
7053
Use the following initialization code:
7154
```ts
7255
import { oneTrust } from '@segment/analytics-consent-wrapper-onetrust'
@@ -83,10 +66,7 @@ Delete the `analytics.load()` line from the snippet
8366
- analytics.load("<MY_WRITE_KEY>");
8467
```
8568

86-
<!---Ask what the preceding step means in context--->
87-
88-
89-
#### For npm library users
69+
### OneTrust for npm library users
9070

9171
```ts
9272
import { oneTrust } from '@segment/analytics-consent-wrapper-onetrust'
@@ -99,36 +79,8 @@ oneTrust(analytics)
9979
analytics.load({ writeKey: '<MY_WRITE_KEY'> })
10080
```
10181

102-
103-
## 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."
13284
13385
## Edit consent categories
13486

@@ -139,14 +91,23 @@ If you need to make changes to your consent categories, you can edit them on the
13991
3. On the Edit consent category page, you can make changes to the consent category name, ID, and the destinations connected to a category.
14092
4. When you have made your changes, click **Save**.
14193

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
143104

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/).
145106

146107
### Tracking Plan
147108

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--->
149110

150111
### Delivery Overview
151112

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`.

src/privacy/consent-management.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Consent Management Overview
3+
hidden: true
34
related:
45
- "/privacy/account-deletion/"
56
- "/privacy/complying-with-the-gdpr/"
@@ -51,6 +52,8 @@ For example, if a user agreed to share their information with you for functional
5152
>
5253
> See the [Semantic Events](/docs/connections/spec/semantic/) docs for more details.
5354
55+
To learn more about configuring consent categories in your workspace, see the [Configure Consent Management documentation](/docs/src/privacy/configure-consent-management).
56+
5457
## Consent object
5558

5659
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
6770

6871
```
6972

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.
7174

7275
### Reconcile consent object and integrations object conflicts
7376

@@ -85,6 +88,4 @@ If the consent object and integrations object have conflicting destination infor
8588
| `{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. |
8689
| `{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. |
8790
| `{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

Comments
 (0)