How to implement CCPA Opt-out.
Instructions
-
Customize the CCPA Opt-out script.
-
Place the code right after
<body>
. -
For any
<script>
element you want to toggle through the CCPA Opt-out tool, change thetype="text/javascript"
parameter totype="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:
-
Organize your different JavaScript scripts into separate
<script>
elements. -
For any
<script>
element you want to toggle through the CCPA Opt-out tool, change thetype="text/javascript"
parameter totype="text/plain"
. -
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:
-
Personalized Ads
Third-party JavaScript scripts that may serve personalized ads to website visitors.
<script type="text/plain" ccpa-opt-out="personalized-ads"></script>