Chord Commerce Event Tracking
Consent Management

OneTrust

5min
onetrust presents customers in affected regions with a cookie banner that banner allows customers to accept cookies, reject cookies, or further customize control segment offers a consent management wrapper that retrieves customer data preferences from onetrust and adds them to segment events as the consent object https //segment com/docs/privacy/consent management/consent in segment connections/#consent object within segment, you can map how data preferences should be applied to segment destinations read more about segment's approach to consent management follow these steps to configure consent management with onetrust and segment configure consent groups in onetrust configure consent categories in segment and map to destinations implement segment's consent management wrapper to include consent in client side events store that consent object on the customer’s cart/order use the cart/order attribute to include customer preferences in server side events configuring onetrust configure consent groups in onetrust these groups will correspond to segment consent categories these groups will have ids like c0001 , etc configuring segment add the consent groups from onetrust as category mappings in your segment workspace by navigating to privacy > consent management > create category you can customize the “category name” for these category mappings, but the “category id” must be exactly the id of the onetrust group to connect preferences from shopify to segment for each category, choose the mapped destinations mapping a destination to a category means that the destination will only receive the segment event if onetrust reports that processing if allowed for that category installing on your site chord recommends using segment’s onetrust consent wrapper https //github com/segmentio/analytics next/tree/master/packages/consent/consent wrapper onetrust this wrapper delays loading the analytics js script until onetrust allows it to load onetrust will only allow it to load if the customer isn’t in an affected region (via onetrust’s own geolocation), or the customer is in an affected region and has consented if onetrust doesn’t allow it to load, both chord and segment will silently fail and the events will not be sent reads customer preferences from onetrust’s global objects (e g window\ onetrustactivegroups ) and constructs a consent object adds that consent object to every client side event sent to segment installing the onetrust segment wrapper see the onetrust consent wrapper readme for instructions on installing the wrapper adding consent to server events managing consent in server sources (e g , segment source functions) isn’t as simple because preferences are set in the browser, we have to communicate that information to the server the easiest way to do so is to store it as an attribute on the cart/order source functions will then read that consent object from the cart/order’s attribute include it in the properties of events it fires (under context consent categorypreferences , as shown here https //segment com/docs/privacy/consent management/consent in segment connections/#consent object ) segment will then use that to honor the same consent group configuration described above