What is Cookie Consent
It is designed to help you comply with data privacy regulations such as the GDPR and still provide a quality user experience.
Customize Your Layout
You can choose from a wide range of layouts and color schemes, including the following example:
When a user accesses your web page for the first time, the following info is included in the stored cookie by default (td_ip, td_client_id and td_global_id).
If the user selects "Decline" on the cookie consent prompt, the following fields (td_ip, td_client_id and td_global_id) will not be sent on any subsequent page visits by this user.
Run a sample
To run a test, you need to create an HTML using test.html
Replace the following content with your customized details:
a. 'WRITE YOUR WRITE ONLY API KEY'
b. 'WRITE YOUR DB NAME'
c. 'WRITE YOUR TABLE NAME'
Set up a simple HTTP server.
For example on Mac:
Try to access from a browser at: http://127.0.0.1/test.html
Or, you can refer to this live demo: https://treasure-data.github.io/js-examples/consensus-management/index.html
You will see a blank page with a bar on the bottom.
Do not select the "Allow cookies" option.
Refresh the page several times and check the destination table that the tracking info is being sent to.
After a few minutes at most, you should begin to see the streaming data in the destination table.
Confirm the streaming data by running a query similar to the following:
Select Decline on test.html page.
Refresh the page.
After the refresh, the consent prompt should no longer appear.
Check the destination table of web tracking again.
After a few minutes at most, you should begin to see the new streaming data in the destination table.
Confirm by running a query similar to the following:
In the following table, you can see the columns td_ip, td_client_id and td_global_id were excluded from the streaming data sent to TD.
The files can be cleaned by prompting the HTTP server to stop running on your local PC and delete test.html file.