This article should not be construed as legal advice. Please discuss with your counsel what you need to do to comply with the GDPR, CCPA, and other similar laws.
Complying with GDPR and CCPA can be time-consuming, confusing, and difficult.
In this recipe, you’ll learn how to save time complying with user deletion and suppression requests by using Segment’s deletion features.
Under the GDPR and CCPA, any company which serves users in the EU and California must allow its users to request that their data is either deleted or suppressed.
Deletion — all identifying info related to the user must be properly deleted.
Suppression — the user should be able to specify where their data is used and sent (e.g. for a marketing, advertising, or product use case).
When you get a deletion request, it doesn’t just mean deleting a few rows of data in your database. It’s your responsibility to purge data about your users from all of your tools – email, advertising, and push notifications.
Typically, this process is incredibly time-consuming. We have seen companies create custom JIRA workflows, in-depth checklists, and other manual work to comply with the law.
In this recipe, we’ll show you how to automate and easily respect user privacy by:
Managing consent with our open source consent manager.
Issuing DSAR (Data Subject Access Requests) on behalf of your users.
Federating those requests to downstream tools.
If you haven’t already, you’ll want to be sure you have a source data setup on your website, and collecting your user data through Segment. The easiest way to do this is via our Javascript, and analytics.identify
calls.
Generally, we recommend you:
Generate user ID in your database — a user ID should never change! It’s best to generate these in your database, so they can stay constant even if a user changes their email address. We’ll handle anonymous IDs automatically.
Collect the traits you have — you don’t have to worry about collecting all traits with every call. We’ll automatically merge them for you, so just collect what you have.
Start with messaging — if you’re trying to come up with a list of traits to collect, start with email personalization. Most customers start by collecting email, first and last name, age, phone, role, and company info so they can send personalized emails or push notifications.
Once you’ve collected data, you’re ready to start your compliance efforts.
Giving users the ability to control what personal data is collected is a huge part of any privacy compliance regime
We’ve built an open source drop-in consent manager that automatically works with Analytics.js: https://github.com/segmentio/consent-manager.
Adding it in is straightforward.
Updating the snippet
First, you’ll want to remove the two lines from your analytics.js snippet.
These will automatically be called by the consent manager.
Add in your config
We’ve included some boilerplate configuration, which dictates when the consent manager is shown and what the text looks like. You’ll want to add this somewhere and customize it to your liking.
You’ll also want to add a target container for the manager to load.
You can customize this to your liking.
Load the consent manager
Finally, we’re ready to load the consent manager.
Once you’re done, it should look like this.