Traditional analytics platforms store raw emails, names, and user records unencrypted, introducing GDPR, CCPA, and compliance liabilities. Hotspot solves this with Deterministic Cryptographic User Hashing.
How Zero-PII User Hashing Works
When you call hotspot.identify(distinctId, traits, { hash: true }), the backend computes a tenant-salted HMAC-SHA256 signature:
Algorithm
user_hash = HMAC-SHA256(site_api_key, raw_user_id)[:16]
Key Security & Privacy Guarantees:
- Tenant Isolation: Even if two websites track the same user
[email protected], their hashes are completely distinct and impossible to correlate across sites. - Zero Raw Storage: No personal emails or raw database IDs are persisted if you choose to hash the identifier.
- Consistent User Journey: The hash is deterministic for a given site, allowing Hotspot to aggregate lifetime visits, returning user percentages, and customer retention.
Identifying Authenticated Users
Call hotspot.identify upon user sign-in or session authentication:
JavaScript
// Identify customer upon login
hotspot.identify("user_9421_enterprise", {
plan: "enterprise",
role: "admin",
company: "Acme Corp",
cycle: "annual",
value_tier: "vip"
}, { hash: true }); // enables zero-PII hashing
Account Switching & Logout Protection
On shared computers or coworking environments, users often log out and another signs in within the same browser tab. To prevent mixing session data:
JavaScript
// Call upon user logout
hotspot.reset();
hotspot.reset() immediately purges cached traits from localStorage, rotates the session ID, and initializes a clean anonymous session.