--- name: fullstory-privacy-controls version: v2 description: Comprehensive guide for implementing Fullstory's Element Privacy Controls (fs-exclude, fs-mask, fs-unmask) for web applications. Teaches proper privacy class usage, understanding what data leaves the device, CSS selector rules, and Form Privacy features. Includes detailed good/bad examples for protecting sensitive elements while maintaining session replay utility. related_skills: - fullstory-privacy-strategy - fullstory-user-consent - fullstory-element-properties - fullstory-capture-control - fullstory-banking - fullstory-healthcare - fullstory-gaming - fullstory-ecommerce --- # Fullstory Privacy Controls API ## Overview Fullstory's Privacy Controls allow developers to control what data is captured and sent to Fullstory servers. This is implemented through CSS classes that define how elements and their content are treated during session recording. **Critical Understanding**: Privacy controls operate at the DOM level in the user's browser: - **Excluded content**: Never leaves the user's device at all - completely ignored - **Masked content**: The **actual text never leaves the device**. It is replaced locally (in the browser) with a wireframe approximation before anything is sent to Fullstory's servers. Fullstory only receives the wireframed placeholder, never the original text. ## Core Concepts ### The Three Privacy Modes | Mode | CSS Class | Data Leaves Device | Events Captured | Best For | | ----------- | ------------- | ------------------------------------------------------------ | --------------- | ----------------------- | | **Exclude** | `.fs-exclude` | ❌ Nothing | ❌ No | Regulated data, secrets | | **Mask** | `.fs-mask` | ⚠️ Structure only (text **never** sent - wireframed locally) | ✅ Yes | PII, names, emails | | **Unmask** | `.fs-unmask` | ✅ Everything | ✅ Yes | Public content | ### Privacy Hierarchy (Most → Least Restrictive) ``` ┌─────────────────────────────────────────────────────┐ │ EXCLUDE (.fs-exclude) │ │ - Element completely ignored │ │ - Events targeting element ignored │ │ - Gray crosshatch in replay │ │ - Nothing sent to Fullstory │ ├─────────────────────────────────────────────────────┤ │ MASK (.fs-mask) │ │ - Actual text NEVER leaves device │ │ - Replaced locally with wireframe approximation │ │ - Only wireframe sent to Fullstory servers │ │ - Element structure sent (knows what was clicked) │ │ - Events captured │ │ - Text appears as "████████" in replay │ ├─────────────────────────────────────────────────────┤ │ UNMASK (.fs-unmask) │ │ - Full text and content captured │ │ - Everything visible in replay │ │ - Default mode (unless Private by Default) │ └─────────────────────────────────────────────────────┘ ``` ### Key Technical Facts 1. **Local Processing**: All privacy filtering happens in the browser before data is sent 2. **Inheritance**: Children inherit parent's privacy class 3. **Override**: Child can unmask/mask within a masked/excluded parent (with exceptions) 4. **Strictest Wins**: When multiple rules match, the most restrictive applies 5. **CSS Selector Based**: Rules can be defined via classes or CSS selectors in Settings ### Default Exclusions Fullstory automatically excludes: - `input[type=password]` - All password fields - `[autocomplete^=cc-]` - Credit card fields (number, CVV, expiry) - `input[type=hidden]` - Hidden inputs --- ## Private by Default Mode Fullstory offers a **Private by Default** mode that inverts the default capture behavior for maximum privacy protection. ### How Private by Default Works | Mode | Default Behavior | When to Use | | ---------------------- | --------------------------------------------------- | -------------------------------------------------- | | **Standard** | Everything captured (unmask) unless excluded/masked | Low-sensitivity applications (marketing sites) | | **Private by Default** | Everything masked unless explicitly unmasked | Sensitive applications (banking, healthcare, SaaS) | ``` ┌─────────────────────────────────────────────────────────────────────────┐ │ STANDARD MODE (Default) │ │ └── All content visible → Add fs-mask/fs-exclude to protect │ ├─────────────────────────────────────────────────────────────────────────┤ │ PRIVATE BY DEFAULT MODE │ │ └── All content masked → Add fs-unmask to reveal safe content │ │ │ │ With Private by Default enabled: │ │ • No text is captured unless explicitly unmasked │ │ • Session replay shows wireframes everywhere │ │ • Zero risk of accidentally capturing sensitive data │ │ • Selectively unmask navigation, buttons, product info │ └─────────────────────────────────────────────────────────────────────────┘ ``` ### Enabling Private by Default Private by Default is enabled via Fullstory Support or during account setup: 1. **New accounts**: Choose "Private by Default" during onboarding wizard 2. **Existing accounts**: Contact [Fullstory Support](https://help.fullstory.com/hc/en-us/requests/new) to enable > **⚠️ Warning for existing accounts**: Enabling Private by Default may break existing segments, event funnels, or Conversions that rely on text elements. Coordinate with your analytics team before enabling. ### When to Use Private by Default | Scenario | Recommendation | | ---------------------------------- | ------------------------------------------ | | **Healthcare applications** | ✅ Highly recommended | | **Banking/financial services** | ✅ Highly recommended | | **Applications with heavy PII** | ✅ Highly recommended | | **Enterprise SaaS (multi-tenant)** | ⚠️ Recommended | | **E-commerce (product pages)** | ⚠️ Consider - may need extensive unmasking | | **Marketing/content sites** | ❌ Probably overkill | ### Unmasking Strategy for Private by Default When Private by Default is enabled, use `.fs-unmask` to reveal safe content: ```html
$99.99
Name: John Smith
Email: john@example.com
John Smith
123 Main Street
San Francisco, CA 94102
SSN: 123-45-6789
Bank Account: 12345678
Routing: 021000021
SSN: 123-45-6789
Bank Account: 12345678
Routing: 021000021
Name: John Smith
Email: john@example.com
Card: **** **** **** 4242
Expiry: 12/25
Name: John Smith
Email: john@example.com
Card: **** **** **** 4242
Expiry: 12/25
Name: ${user.name}
Email: ${user.email}
Phone: ${user.phone}
SSN: ${user.ssn}
Name: ${user.name}
Email: ${user.email}
Phone: ${user.phone}
SSN: ${user.ssn}