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 true 330,331 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 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 true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 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