Chord Event Tracking
...
Custom storefront
Custom storefront consent management
6 min
for custom storefronts, chord supports consent management through third party consent management platforms (cmps) this guide covers integrating your cmp with chord's analytics library supported consent providers the @chordcommerce/analytics library supports the following consent adapters provider consent value onetrust "onetrust" ketch "ketch" configuration to enable consent management, add the consent and optionally awaitconsent options when initializing const chord = new chordanalytics({ consent 'onetrust', // your consent provider awaitconsent true, // wait for consent before sending events cdpdomain process env chord domain, cdpwritekey process env chord write key, // rest of config }) options option type default description consent string — the consent adapter to use "onetrust" or "ketch" awaitconsent boolean false if true , delays sending events until consent is given events will queue but not forward to destinations until consent is granted timeout is 1 minute — if consent is not given within that time, events are dropped how it works when a consent adapter is configured chord reads the customer's consent preferences from your cmp a consent object is attached to every event sent to chord chord uses your configured consent category mappings to determine which destinations receive each event configuring consent categories in chord navigate to consent categories in the chord platform to create consent category mappings map each category from your cmp to the appropriate destinations for each category, choose which destinations should receive events when the customer has consented to that category destinations not mapped to any category will receive all events regardless of consent onetrust if using onetrust as your cmp install and configure onetrust on your site according to their documentation set consent "onetrust" in your chord configuration chord will automatically read consent preferences from onetrust's api and include them with events without a supported cmp if your consent management platform is not in the supported list, you can manage consent manually using the generic track method to include consent data, or contact mailto\ help\@chord co to discuss adding support for your provider