Build your CCPA Opt-out.

Customize your CCPA Opt-out tool in 3 easy steps.

We recommend not changing the title as CCPA may require this specific text, ie. Do Not Sell My Personal Information.

Instead of loading the banner at every page load you can load it only when the user clicks the Change My Preferences button.

Copy your CCPA Opt-out code below and begin to adjust your JavaScript scripts accordingly.

Place the code right after <body>.

Live Preview

How to implement CCPA Opt-out.

Instructions

  1. Customize the CCPA Opt-out script.

  2. Place the code right after <body>.

  3. For any <script> element you want to toggle through the CCPA Opt-out tool, change the type="text/javascript" parameter to type="text/plain".

How to tag your JavaScript scripts.

Adjust your JavaScript scripts

Under CCPA, serving personalized ads may be considered a "sale". The CCPA Opt-out by TermsFeed solution can be used to help your website visitors opt-out of any personalized ads that you serve on your website through third-party JavaScript scripts, such as Google Ads and others.

However, it's still up to you to make sure that you respect the user choices and that you provide users with an opt-out mechanism, as defined by CCPA, for anything that can be considered a "sale" of personal information.

Example

Let's take the JavaScript code of Google Analytics. With the CCPA Opt-out by TermsFeed, you can enable or disable the Google Analytics tracking code based on what a user specific privacy preferences is: load it (not oped-out) or not load it (opted-out).

To do that:

  1. Organize your different JavaScript scripts into separate <script> elements.

  2. For any <script> element you want to toggle through the CCPA Opt-out tool, change the type="text/javascript" parameter to type="text/plain".

  3. Then, add a ccpa-opt-out="personalized-ads" attribute to each script.


<!-- Google Tracking Code -->

<script type="text/plain" ccpa-opt-out="personalized-ads"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNod e.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', /* Google Property ID */, 'auto'); ga('send', 'pageview');

</script>

CCPA Opt-out levels and categories.

The current version of the CCPA Opt-out solution has the following levels available:

  1. Personalized Ads

    Third-party JavaScript scripts that may serve personalized ads to website visitors.

    <script type="text/plain" ccpa-opt-out="personalized-ads"></script>