<!doctype html>
<html> 
  <head>
    <script type="text/javascript">
        var _iub = _iub || [];
        _iub.csConfiguration = {
            "lang": "en",
            "siteId": 896537, //use your siteId
            "cookiePolicyId": 8207462, //use your cookiePolicyId
            "consentOnScroll": false, //avoid consent to be given when the user scrolls the page
            "enableCcpa": true,
            "ccpaApplies": true,
            "enableGdpr": false,
            "gdprApplies": false,
            "gdprAppliesGlobally": false,
            "banner": {
                "position": "float-top-center"
            }
        };
    </script>
    <script src="//cdn.iubenda.com/cs/ccpa/stub.js"></script>
    <script type="text/javascript" src="//cdn.iubenda.com/cs/iubenda_cs.js" charset="UTF-8" async></script>
  </head>

  <body>
    <header>
      <div class="wrapper">
        <h1>iubenda Cookie Solution for CCPA</h1>
        <p>Non-EU business that operates in California but not in the EU</p>
      </div>
    </header>
    
    <section class="wrapper">
      
      <p>In this demo for <strong>non-EU business that operates in California but not in the EU</strong>, we want to apply CCPA protections to all our users, but not apply the GDPR to any of them.</p> 
      
      <p>On the configurator, select "Apply CCPA" and "Always Apply CCPA":</p>
      
      <img src="https://help.iubenda.com/wp-content/uploads/2019/12/cookie-solution-ccpa-all-users.png" />
      
      <p>As you can see from the Cookie Solution snippet, we've set:</p>
      
      <ul>
        <li><code>enableCcpa: true</code></li>
        <li><code>ccpaApplies: true</code></li>               
        <li><code>enableGdpr: false</code></li>
        <li><code>gdprApplies: false</code></li>
        <li><code>gdprAppliesGlobally: false</code></li>
      </ul>      
      
      <div class="tip">
        <p>If you want the CCPA to <strong>only</strong> apply to Californian users, select "Apply CCPA" and "Automatically detect when to apply CCPA based on user location":</p>
        
        <img src="https://help.iubenda.com/wp-content/uploads/2019/12/cookie-solution-ccpa-californian-users.png" />

        <p>Code:</p>
        
        <ul>
          <li><code>enableCcpa: true</code></li>
          <li><code>gdprAppliesGlobally: false</code></li>
          <li><code>countryDetection: true</code></li>                 </ul>     
      </div>
      
      <h4>"Do Not Sell My Personal Information" link</h4>
      
      <p>In order to show a "Do Not Sell My Personal Information" link on your website (in addition to the one included in the banner), just add the <code>iubenda-ccpa-opt-out</code> class to a custom link or button:</p>
      
      <p><a href="javascript:void(0)" class="iubenda-ccpa-opt-out">Do Not Sell My Personal Information</a></p>
      
      <p>This link will let you honor opt-out requests.</p>
      
      <div class="note">
        <ul>
          <li>Remember to use your own credentials from <a href="https://www.iubenda.com/en/dashboard" target="_blank">your iubenda account</a></li>
          <li>This is a sample for pure demonstrative purposes, <strong>no consents are saved</strong> (result of <code>_iub.csConfiguration.skipSaveConsent = true</code>). <a href="#" onclick="_iub.cs.cookie.resetCookies({local: true,remote: true});alert('Consent cookie deleted. Now click on OK and refresh the page to return to the starting point.')">Reset consent</a> and refresh the page to return to the starting point.</li>
        </ul>
      </div>
      
      <!--hr /-->
      
      <h4>Helpful guides</h4>
      <ul class="guides">
        <li><a href="https://www.iubenda.com/en/help/19133" target="_blank">CCPA Guide
</a></li> 
        <li><a href="https://www.iubenda.com/en/help/21165" target="_blank">CCPA: How to add a notice of collection and a "Do not sell" link</a></li>
      </ul>
      
    </section>
  </body>
</html>
//don't copy this JS (just for demo purposes)

//don't save consent, always show the banner
_iub.csConfiguration.skipSaveConsent = true; 

External CSS

  1. https://codepen.io/iubenda/pen/65341ae6a1bb5e161d81bfb510c245a4

External JavaScript

This Pen doesn't use any external JavaScript resources.