Cookieless Tracking
import { Aside } from ‘@astrojs/starlight/components’;
analyze.swiss supports fully cookieless tracking, allowing you to collect analytics data without storing any identifiers on the user’s device.
Why Cookieless?
Section titled “Why Cookieless?”- GDPR Compliance: No cookie consent banner required in most cases
- Privacy-First: Respects user privacy by default
- Ad Blocker Resistant: Works even when cookies are blocked
- Trust Building: Shows users you respect their privacy
How It Works
Section titled “How It Works”In cookieless mode, analyze.swiss uses a combination of:
- Session Hashing: A hash based on the user’s IP, User-Agent, and the current date
- Fingerprint-Free: No browser fingerprinting techniques
- Daily Reset: Session resets each day for privacy
User Session = Hash(IP + UserAgent + Date + Salt)Enabling Cookieless Mode
Section titled “Enabling Cookieless Mode”Via Script Attribute
Section titled “Via Script Attribute”<script src="https://analyze-ingest.thismatters.workers.dev/s/a.js" data-api-key="YOUR_API_KEY" data-cookieless="true" defer></script>Via SDK Configuration
Section titled “Via SDK Configuration”import { Analyze } from '@analyze.swiss/sdk';
const analyze = new Analyze({ apiKey: 'YOUR_API_KEY', cookieless: true});Via Workspace Settings
Section titled “Via Workspace Settings”- Go to Settings → Privacy
- Enable Cookieless Tracking Mode
- Save changes
This applies to all tracking for your workspace.
Comparison: Cookies vs Cookieless
Section titled “Comparison: Cookies vs Cookieless”| Feature | With Cookies | Cookieless |
|---|---|---|
| Unique Visitors | Accurate | Slightly overcounted |
| Session Tracking | Multi-day | Daily reset |
| Returning Visitors | ✅ Tracked | ❌ Not tracked |
| Cross-Device | ✅ With identify() | ✅ With identify() |
| Cookie Banner | Usually required | Usually not required |
| GDPR Compliant | ✅ With consent | ✅ By default |
Best Practices
Section titled “Best Practices”1. Use identify() for Logged-In Users
Section titled “1. Use identify() for Logged-In Users”Even in cookieless mode, you can track returning users by calling identify() after login:
// User logs inanalyze.identify('user_123', { email: 'user@example.com'});
// Now this user is tracked accurately across sessions2. Combine with First-Party Domain
Section titled “2. Combine with First-Party Domain”For best results, combine cookieless mode with a first-party tracking domain:
<script src="https://t.yourdomain.com/a.js" data-api-key="YOUR_API_KEY" data-cookieless="true" defer></script>3. Consider Your Use Case
Section titled “3. Consider Your Use Case”| Use Case | Recommendation |
|---|---|
| Marketing site | Cookieless ✅ |
| SaaS app with login | Cookies + identify() |
| E-commerce | Cookies + identify() on checkout |
| Blog/Content | Cookieless ✅ |
Legal Considerations
Section titled “Legal Considerations”In many jurisdictions, cookieless analytics that don’t collect personal data may not require explicit consent. However:
- GDPR (EU): Cookie consent may not be required for strictly necessary analytics
- CCPA (California): Does not apply to anonymous data
- ePrivacy Directive: May still require disclosure in privacy policy
We recommend:
- Mentioning analytics in your privacy policy
- Consulting with a privacy professional
- Providing an opt-out mechanism regardless
IP Anonymization
Section titled “IP Anonymization”Even in cookieless mode, we anonymize IP addresses:
Original: 192.168.1.123Stored: 192.168.1.0 (last octet zeroed)This provides geographic data while protecting user identity.
Next Steps
Section titled “Next Steps”- Pixel White-labeling – Use your own domain
- Privacy Settings – Additional privacy controls
- Identity Resolution – Track logged-in users