Privacy Tools Guide

The California Consumer Privacy Act (CCPA) and its successor, the California Privacy Rights Act (CPRA), give California residents powerful rights over their personal information. Among the most important is the right to opt out of the sale of your personal data. If you’ve ever wondered how to actually exercise this right effectively—especially as a developer or power user who wants to automate the process—this guide provides practical steps, template scripts, and technical details for making your opt-out requests stick.

Understanding Your CCPA Opt-Out Rights

Under CCPA/CPRA, California residents have the right to direct businesses that sell or share their personal information to stop doing so. The law defines “sale” broadly—it includes renting, releasing, disclosing, disseminating, making available, transferring, or communicating your personal information to third parties for monetary or other valuable consideration.

Companies must provide a clear “Do Not Sell or Share My Personal Information” link on their homepage. They must also honor opt-out requests within 15 days, with a possible 15-day extension. Once you opt out, the company cannot sell or share your data for at least 12 months before asking again.

This right applies to businesses that meet CCPA thresholds: those with annual gross revenues over $25 million, those that buy/sell/share data of 100,000+ consumers, or those deriving 50%+ revenue from selling personal information.

Finding Companies That Sell Your Data

Before you can opt out, you need to identify which companies have your data. Common sources include:

For developers, you can programmatically scan for trackers using tools like puppeteer-extra-plugin-stealth combined with request logging to identify which domains receive your data.

Methods for Submitting Opt-Out Requests

Method 1: Direct Website Submission

Most companies provide an opt-out form on their privacy page. Look for:

Method 2: Email-Based Requests

When no web form exists, email serves as a valid request method. Your email must include:

Method 3: Toll-Free Numbers

Some companies offer phone-based opt-out. Document the representative’s name, call reference number, and any confirmation provided.

Automating Opt-Out Requests with Scripts

For power users managing opt-outs across multiple companies, automation saves significant time. Below are practical scripts for sending properly formatted CCPA opt-out requests.

Python Script for Batch Opt-Out Emails

import smtplib
from email.mime.text import MIMEText
import json

def create_ccpa_opt_out_email(company_name, company_email, user_info):
    """Generate a CCPA-compliant opt-out email template."""
    subject = f"CCPA Opt-Out Request: Do Not Sell My Personal Information"

    body = f"""Dear {company_name} Privacy Team,

I am a California resident exercising my right under the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA) to opt out of the sale and sharing of my personal information.

Company Name: {company_name}
My Identifying Information: {user_info['email']}

Please confirm receipt of this request and provide written confirmation once you have stopped selling or sharing my personal information.

If you require additional information to verify my identity, please contact me at {user_info['email']}.

Thank you for your prompt attention to this matter.

Sincerely,
{user_info['name']}
"""
    return subject, body

def send_opt_out_email(smtp_config, company_email, subject, body):
    """Send the opt-out email via SMTP."""
    msg = MIMEText(body)
    msg['Subject'] = subject
    msg['From'] = smtp_config['sender']
    msg['To'] = company_email

    with smtplib.SMTP(smtp_config['server'], smtp_config['port']) as server:
        server.starttls()
        server.login(smtp_config['username'], smtp_config['password'])
        server.send_message(msg)

# Example usage
companies = [
    {"name": "Acme Data Corp", "email": "privacy@acmedata.com"},
    {"name": "Marketing Partners Inc", "email": "optout@marketingpartners.com"},
]

user_info = {"email": "your@email.com", "name": "Your Name"}
smtp_config = {"server": "smtp.example.com", "port": 587,
               "username": "your@email.com", "password": "app-specific-password"}

for company in companies:
    subject, body = create_ccpa_opt_out_email(company["name"], company["email"], user_info)
    print(f"Sending to {company['name']}...")
    # Uncomment to send: send_opt_out_email(smtp_config, company['email'], subject, body)

Bash Script Using Curl for Web Form Submissions

#!/bin/bash

# CCPA Opt-Out Web Form Submitter
# Usage: ./ccpa_optout.sh "company-name" "https://company.com/optout" "user@example.com"

COMPANY_NAME="$1"
OPT_OUT_URL="$2"
USER_EMAIL="$3"

# Common form field patterns (adjust based on target site)
PAYLOAD="email=${USER_EMAIL}&request_type=opt_out&ccpa_consent=true"

echo "Submitting CCPA opt-out request to ${COMPANY_NAME}..."

RESPONSE=$(curl -s -w "\n%{http_code}" \
  -X POST "${OPT_OUT_URL}" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -H "User-Agent: CCPA-OptOut-Tool/1.0" \
  -d "${PAYLOAD}")

HTTP_CODE=$(echo "${RESPONSE}" | tail -n1)
BODY=$(echo "${RESPONSE}" | sed '$d')

if [[ "$HTTP_CODE" =~ ^2[0-9][0-9]$ ]]; then
  echo "Success: HTTP ${HTTP_CODE}"
else
  echo "Failed: HTTP ${HTTP_CODE}"
  echo "Response: ${BODY}"
fi

JavaScript/Node.js for Browser-Based Automation

/**
 * CCPA Opt-Out Request Automator
 * Run in browser console or as a Node.js script with puppeteer
 */

const companies = [
  { name: 'Acme Corp', privacyUrl: 'https://acme.com/privacy', formSelector: '#opt-out-form' },
  { name: 'Data Partners LLC', privacyUrl: 'https://datapartners.com/privacy-center' },
];

async function submitOptOut(page, company, userEmail) {
  await page.goto(company.privacyUrl);

  // Look for common opt-out link patterns
  const optOutLink = await page.$('a[href*="do-not-sell"], a[href*="opt-out"], a[title*="Do Not Sell"]');

  if (optOutLink) {
    await optOutLink.click();
    await page.waitForNavigation();
  }

  // Fill common form patterns
  const emailInput = await page.$('input[type="email"], input[name*="email"], input[id*="email"]');
  if (emailInput) {
    await emailInput.type(userEmail);
  }

  // Submit the form
  const submitButton = await page.$('button[type="submit"], input[type="submit"]');
  if (submitButton) {
    await submitButton.click();
  }

  console.log(`Submitted opt-out request to ${company.name}`);
}

// Puppeteer usage example
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({ headless: 'new' });
  const page = await browser.newPage();
  const userEmail = 'your-email@example.com';

  for (const company of companies) {
    try {
      await submitOptOut(page, company, userEmail);
    } catch (error) {
      console.error(`Failed for ${company.name}:`, error.message);
    }
  }

  await browser.close();
})();

Documenting Your Opt-Out Requests

Always keep records of your opt-out submissions:

  1. Email confirmations: Save sent emails and any auto-replies
  2. Screenshot web forms: Capture before and after submission
  3. Call logs: Note date, time, representative name, and confirmation numbers
  4. Follow-up deadlines: CCPA requires responses within 15 days—mark your calendar

If a company fails to comply within the required timeframe, you can file a complaint with the California Attorney General’s office. The AG can impose penalties of up to $2,500 per unintentional violation and $7,500 per intentional violation.

Verifying Opt-Out Compliance

After submitting requests, verify companies have stopped selling your data:

Additional Considerations

The CPRA introduced a “share” right, covering behavioral advertising and cross-context tracking—not just traditional sales. Your opt-out should explicitly cover both sale and sharing.

Global Privacy Control (GPC), a browser signal you can enable, automatically transmits opt-out preferences to websites. However, manually submitting requests provides stronger legal documentation.

For developers building opt-out into applications, implement proper handling: honor GPC signals server-side, provide prominent opt-out mechanisms, and maintain audit logs of consumer requests.

Built by theluckystrike — More at zovo.one