|
| 1 | +--- |
| 2 | +title: Consent in Segment Connections |
| 3 | +hidden: true |
| 4 | +related: |
| 5 | + - "/privacy/consent-management/" |
| 6 | + - "/privacy/configure-consent-management/" |
| 7 | + - "/privacy/consent-in-unify/" |
| 8 | +--- |
| 9 | + |
| 10 | +> info "Consent Management is in private beta" |
| 11 | +> 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. |
| 12 | +
|
| 13 | +Segment Connections users can add the [consent object](#consent-object) to their sources to stamp events with the end user consent preferences captured by your consent management platform (CMP) and send them downstream to destinations in categories that an end user consented to share data with. Events without the consent object continue to flow to destinations without consent enforcement. |
| 14 | + |
| 15 | +For more information about configuring consent categories, see the [Configure Consent Management](/docs/privacy/configure-consent-management/#step-1-create-consent-categories-in-the-segment-app) documentation. |
| 16 | + |
| 17 | +If your sources also contain the integrations object, Segment will look at the consent object first, and then take into account the integrations object according to the table in the [Reconcile consent object and integrations object](#reconcile-consent-object-and-integrations-object-conflicts) documentation. |
| 18 | + |
| 19 | +> info "Unify users must send an additional event to add consent preferences to Profiles" |
| 20 | +> If you use Unify, see the [Consent in Unify](/docs/privacy/consent-in-unify) documentation for more information about the Segment Consent Preference event, which Segment uses with the consent object to add consent preference to Profiles. |
| 21 | +
|
| 22 | +## Consent object |
| 23 | + |
| 24 | +Segment requires every event from all of your sources to include the end user consent preferences, captured by your CMP or your application logic, in the form of the **consent object**. The consent object is a JSON object with the following format: |
| 25 | + |
| 26 | +```json |
| 27 | +{ |
| 28 | +"context": { |
| 29 | + "consent": { |
| 30 | + "categoryPreferences": { |
| 31 | + "Advertising": true, |
| 32 | + "Analytics": false, |
| 33 | + "Functional": true, |
| 34 | + "DataSharing": false |
| 35 | + } |
| 36 | + } |
| 37 | + } |
| 38 | +} |
| 39 | + |
| 40 | +``` |
| 41 | + |
| 42 | +<!-- 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. For more information about Consent in Unify, see the [Consent in Unify](/docs/privacy/consent-management-in-unify) docs.--> |
| 43 | + |
| 44 | +Events without the consent object will continue to flow to destinations without consent enforcement. |
| 45 | + |
| 46 | +## Reconcile consent conflicts |
| 47 | + |
| 48 | +Segment resolves conflicts between your [consent object and your integration object](#reconcile-consent-object-and-integrations-object-conflicts) and between your [CMP and the consent categories you configured in the Segment app](#reconcile-cmp-and-segment-consent-category-conflicts). |
| 49 | + |
| 50 | +### Reconcile consent object and integrations object conflicts |
| 51 | + |
| 52 | +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. |
| 53 | + |
| 54 | +> success "" |
| 55 | +> For more information about the Integrations object, please see [Filtering your Segment Data](/docs/guides/filtering-data/#filtering-with-the-integrations-object). |
| 56 | +
|
| 57 | +If an event includes both an integrations and consent object, Segment will look at the consent object first, and then take into account the integrations object according to the following table: |
| 58 | + |
| 59 | +| Consent Object | Integration Object | Result | |
| 60 | +| --------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ------ | |
| 61 | +| Not provided or empty consent object <br><br> `"context": {` <br>`}` <br>OR<br> `"context": {`<br>` "consent": {`<br>` }`<br>`}` | Not provided or empty object | Data flows to all destinations. | |
| 62 | +| Empty categoryPreference object <br><br> `"context": {`<br>` "consent": {`<br>` "categoryPreference": {` <br>` }`<br>` }` <br> `}`| Not provided or empty object | Data does **NOT** flow to any mapped destinations - consent is considered to be `false` for all categories. <br> <br> Data flows to all destinations **NOT** mapped to a consent category. | |
| 63 | +| Not provided <br><br> `"context": {` <br>`}` | `{facebook: true,`<br>`amplitude: false}` | Data flows to the destinations that are `true` in the integrations object (Facebook). Any metadata provided in the integrations object also flows to your downstream destinations. | |
| 64 | +| Empty consent object <br><br> `"context": {`<br>` "consent": {`<br>` }`<br>`}` <br> OR <br> `"context": {`<br>` "consent": {`<br>` "categoryPreference": {` <br>` }`<br>` }` <br> `}`| `{facebook: true,`<br>`amplitude: false}` | Data does **NOT** flow to any mapped destinations - consent is considered to be `false` for all categories. <br><br> Data flows to all destinations **NOT** mapped to a consent category, destinations set to `true` in the integrations object, and destinations not included in the integrations object. | |
| 65 | +| `{ad: true,` <br>`analytics: false}`<br> <br>_Segment has no category-to-destination mapping for ad and analytics_ | Provided, not provided, or empty object | Data flows to all destinations, as all destinations are unmapped. If the integrations object is present, data flow may be impacted. | |
| 66 | +| `{ad: true,` <br>`analytics: false}`<br> <br>_ad = facebook, google-ads_ <br> | Not provided or empty object | Data flows to destinations that map to a consented purpose. In this case, data flows to all ad destinations (Facebook and Google Ads).<br><br> No data flows to analytics destinations. | |
| 67 | +| `{ad: true,` <br>`analytics: false}`<br><br>_ad = facebook, google-ads_ <br> _analytics = amplitude_ | `{facebook: true,`<br>`amplitude: false}` | Data flows to all ad destinations, even though Google Ads is not present in the integrations object.<br><br> Data does **NOT** flow to analytics destinations. | |
| 68 | +| `{ad: true,` <br>`analytics: false}`<br><br>_ad = facebook, google-ads_ <br> _analytics = amplitude_ | `{facebook: false,`<br>`amplitude: false}` | Data only flows to Google Ads and not to Facebook, which is `false` in the integrations object. <br><br> Data does **NOT** flow to analytics destinations. | |
| 69 | +| `{ad: true,` <br>`analytics: false}`<br><br>_ad = facebook, google-ads_ <br> _analytics = facebook, amplitude_ | `{facebook: true,`<br>`amplitude: false}` | When destinations are mapped to multiple categories, data only flows if consent is `true` for all categories. In this case, data only flows to Google Ads and not to Facebook. <br><br>Data does **NOT** flow to analytics destinations. | |
| 70 | +| `{ad: true,` <br>`analytics: true}`<br><br>_ad = facebook, google-ads_ <br> _analytics = facebook, amplitude_ | `{facebook: true,`<br>`amplitude: false}` | When destinations are mapped to multiple categories, data only flows if consent is `true` for all categories. In this case, data flows to Google Ads and Facebook. No data flows to Amplitude because it is `false` in the integrations object. | |
| 71 | +| `{ad: false,` <br>`analytics: true}` <br><br>_ad = facebook, google-ads_ <br> _analytics = facebook, amplitude_ | `{facebook: true,`<br>`amplitude: false}` | When destinations are mapped to multiple categories, data only flows if consent is `true` for all categories. <br><br>In this example, data does **NOT** flow to any destination because of the interaction between the integrations and consent objects. | |
| 72 | + |
| 73 | +### Reconcile CMP and Segment consent category conflicts |
| 74 | + |
| 75 | +If you have a category configured in your consent management tool (for example, `advertising`) and there is no category with the same ID in Segment, the data will flow to unmapped destinations. If destinations are mapped to a different category in the Segment app, data flow will honor end user consent for that category. |
| 76 | + |
| 77 | +If there is a category configured in Segment (`functional`) that is not mapped in your CMP, data will not flow to destinations mapped to the `functional` category. |
| 78 | + |
| 79 | +## Content observability |
| 80 | + |
| 81 | +Events discarded due to consent preferences appear in [Delivery Overview](/docs/connections/delivery-overview/) at the "Filtered at destination" step with the discard reason *Filtered by end user consent*. |
0 commit comments