Objective
This article explains how to backfill consent preferences from a data warehouse (such as BigQuery) into Segment Profiles using the native Consent Mapping feature in Reverse ETL. Customers often ask how to efficiently update consent traits and ensure consent states are attached to the context.consent object in Segment events.
Product
Segment
Environment
Segment Console
User Account Permission/Role(s) Required
Workspace Owner or user with permission to configure Reverse ETL models and Consent Mappings.
Procedure
-
Prepare Your Data Model:
- In your data warehouse (e.g., BigQuery), create columns for each consent category (such as
has_analytics_consent,has_marketing_consent) with boolean values for each user.
- In your data warehouse (e.g., BigQuery), create columns for each consent category (such as
-
Access Reverse ETL in Segment:
- Log in to the Segment Console.
- Navigate to Connections > Sources > Reverse ETL.
-
Select Your Source/Model:
- Choose your BigQuery source and the model you want to use for backfilling consent.
-
Configure Consent Mappings:
- In the model settings, locate Consent settings or Consent Mappings.
- Map each consent-related column from your warehouse to the corresponding Segment Consent Category.
-
Set Up the Track Event:
- Configure your Reverse ETL model to trigger a Track event named
"Segment Consent Preference Updated".
- Configure your Reverse ETL model to trigger a Track event named
-
Automatic Consent Injection:
- When the model runs, Segment automatically formats the extracted rows and injects the
context.consent.categoryPreferencesobject into the event payload. - No manual payload manipulation or webhooks are required.
- When the model runs, Segment automatically formats the extracted rows and injects the
-
Verify Delivery:
- Check your destination or Profile Explorer to confirm that consent preferences are appearing in the
context.consentobject as expected.
- Check your destination or Profile Explorer to confirm that consent preferences are appearing in the
Additional Information
- For more details, see Consent in Unify documentation and Consent in Reverse ETL.
- Only Workspace Owners can create or edit consent categories.
- Consent Management in Reverse ETL is available for Business tier plans.