website logo
Navigate through spaces
⌘K
OVERVIEW
ORDER MANAGEMENT (OMS)
SHIPPING - SETUP
Shipping Methods
Shipping Zones
Shipping Method Setup Examples
TAXES - Setup
Tax Automation with Stripe Tax
Tax Automation with Avalara
CONTENT MANAGEMENT (CMS)
DATA
CUSTOMER LIFETIME REVENUE
Customer Lifetime Revenue Explanation
Customer Lifetime Revenue and Purchase Likelihood
Recency Frequency and Monetary
CLR and RFM Data Table Glossary
RFM and CLR in the Hub
LOOKER
Modifying a Dashboard
Timestamp differences between Looker, OMS and Shopify
How to create custom calculations in Looker
Looker and Shopify data models
Custom fields
How to 'Save and Schedule' reports
Creating Custom Reports or Look
Looks vs Dashboards
Login Looker FAQ
Looker Glossary
SEGMENT EVENT TRACKING
What are event tracking
Adding Tracking
What is the Tracking Plan?
The Chord Tracking Plan
The Shopify Tracking Plan
Event Tracking FAQ
EVENT UPDATES PAGE
Email Subscription Payment Event Update
Product Feed Setup
Getting Segment to Production
Consent Management
Installing in Next.js
Installing in Gatsby
Integrations
👩‍💻Developer Tools
Using Chord with Shopify
Docs powered by archbee 

Consent Management

5min

Consent Management is the process of informing customers about the data your business collects and how it is used, and giving them the ability to opt in or out. It's important for compliance with data privacy laws, like the General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA).

We recommend using Segment’s Consent Manager on your website. The Consent Manager provides consent management for all integrations configured via Segment.

The Consent Manager is an add-on for Analytics.js. It includes a couple of variations:

  • ConsentManager React component with pre-built UI
  • ConsentManagerBuilder React component with custom UI
  • Stand-alone script for non-React websites with pre-built UI

Segment describes its functionality:

"It works by taking control of the analytics.js load process to only load destinations that the user has consented to and not loading analytics.js at all if the user has opted out of everything. The user's tracking preferences are saved to a cookie and sent as an identify trait (if they haven't opted out of everything) so that you can also access them on the server-side and from destinations (warehouse)."

Installing the Consent Manager

View the Github repo for complete installation instructions. Note that Segment's npm package @segment/analytics-next is not currently compatible with the Consent Manager, so you'll need to install Segment via snippet.

The ConsentManager component is also fully implemented in Chord's Next.js and Gatsby starter kits. See below for more framework-specific tips.

Two important things as you're getting started:

Remove analytics.load()

The Consent Manager controls the load process of Analytics.js, so you shouldn't have analytics.load anywhere in your website code. It's part of Segment's default code snippet, so you may need to delete it. Just remove the line analytics.load("YOUR_WRITE_KEY"). The Consent Manager will handle calling analytics.load.

Removing analytics.load("YOUR_WRITE_KEY") means Segment won't load without the Consent Manager, so be sure to include the Consent Manager on every page on your site.

Configure integrations

Before getting started, verify you have integrations configured. In order for the Consent Manager to work, you must set up at least one Segment integration in your Segment workspace. Verify that your integrations (Google Analytics, Amplitude, etc.) are accessible by visiting the URL below. The response should not return an empty array if you have properly configured them: https://cdn.segment.com/v1/projects/<YOUR_WRITE_KEY>/integrations

Using with frameworks

View guides for implementing the Consent Manager in Installing in Next.js and Installing in Gatsby.

if you have any questions or need help, please reach out to us at help@chord.co



Updated 14 Apr 2023
Did this page help you?
Yes
No
PREVIOUS
Getting Segment to Production
NEXT
Installing in Next.js
Docs powered by archbee 
TABLE OF CONTENTS
Installing the Consent Manager
Remove analytics.load()
Configure integrations
Using with frameworks