Skip to main content

Privacy & Compliance

MentiQ Analytics is designed with privacy in mind, providing built-in features to help you comply with GDPR, CCPA, and other privacy regulations while still collecting valuable analytics data.

Privacy Features Overview

MentiQ provides multiple layers of privacy protection:
  • Session Recording Privacy - CSS class-based masking for sensitive content
  • PCI Compliance - Automatic sanitization of payment data
  • Subscription Data Validation - Removes sensitive payment information
  • User Data Control - Easy user identification and reset
  • No Automatic PII Collection - You control what data is tracked

Session Recording Privacy

When using session recording, protect sensitive data with CSS classes:

Privacy CSS Classes

Completely block elements from recording
Element and all children are not recorded at all - appears as blank space in replays.Use for:
  • Password inputs
  • Credit card fields
  • SSN or sensitive ID numbers
  • Private user data

Complete Privacy Example

components/PaymentForm.tsx

Custom Recording Configuration

For more control, configure session recording options:

Payment Data Compliance

MentiQ automatically sanitizes payment data to maintain PCI compliance:

Automatic Sanitization

What Gets Removed

The SDK automatically removes:

Validation Logic

The SDK’s validation code (from analytics.ts:510-538):

User Data Management

User Identification

Reset User Data

The reset() method clears:
  • User ID from localStorage
  • Event queue
  • Session data (starts new session)
  • Any cached user traits

GDPR Compliance

Implement consent before tracking:
components/CookieConsent.tsx

Conditional Analytics Provider

Only initialize analytics after consent:
app/layout.tsx

Data Minimization

Only Track What You Need

Don’t track sensitive or unnecessary data. Every data point should have a clear business purpose.

Anonymous vs Identified Users

Right to Be Forgotten

Implement GDPR Article 17 (Right to Erasure):
app/api/delete-user-data/route.ts

IP Address Handling

MentiQ can anonymize IP addresses server-side:

Server-Side Events

The MentiQ backend can automatically anonymize IP addresses by masking the last octet (e.g., 192.168.1.xxx). Contact support to enable this feature.

Opt-Out Implementation

components/PrivacySettings.tsx

Security Best Practices

1

Use Separate API Keys

Use different API keys for client-side and server-side tracking:
.env.local
2

Never Log Sensitive Data

Disable debug mode in production:
3

Sanitize Event Properties

Create a utility to sanitize properties:
4

Use HTTPS Only

Always use HTTPS for your analytics endpoint:

Compliance Checklist

Implement cookie consent banner
Provide clear privacy policy
Allow users to opt-out of tracking
Implement right to be forgotten (data deletion)
Use privacy CSS classes for session recording
Minimize data collection to necessary only
Anonymize or don’t collect IP addresses
Secure data transmission (HTTPS only)
Provide “Do Not Sell My Data” option
Allow users to delete their data
Disclose data collection practices
Provide opt-out before data sale
Never store full card numbers
Never store CVV codes
Only store last 4 digits of cards
Use SDK’s automatic sanitization
Encrypt data in transit (HTTPS)

Next Steps

Next.js Integration

Set up privacy-compliant analytics in Next.js

TypeScript Types

Learn about SubscriptionProperties and validation