Mida uses a privacy-first approach to identify unique visitors without relying on persistent cookies or invasive tracking methods. This article explains how the visitor identification system works and how to access the unique visitor ID.
Overview
Mida generates a unique visitor identifier (UUID) by combining multiple browser and device signals into a single hashed value. This approach:
Works across sessions without requiring persistent cookies
Respects user privacy by not storing raw data
Complies with GDPR when using EU servers (canvas fingerprinting disabled)
Provides consistent identification for A/B test bucketing
How the UUID is Generated
When a visitor loads a page with Mida installed, the following signals are collected and sent to the server:
Client-Side Signals
Signal | Description |
lang | Browser language (e.g., en-US) |
tz | Timezone (e.g., America/New_York) |
width | Screen width in pixels |
canvas | Canvas fingerprint hash (6 characters) |
ua | User agent string |
platform | Operating system platform |
Server-Side Processing
The server processes these signals and combines them with the visitor's IP address to generate a deterministic UUID:
Language Simplification: en-US → en
Timezone Bucketing: America/New_York → America (region only)
Screen Width Bucketing:
< 768px → small
768-1023px → medium
1024-1439px → large
≥ 1440px → xlarge
OS Family Detection: Windows, macOS, Linux, Android, iOS, or other
Device Type: mobile, tablet, or desktop
Browser Version: Major version only (e.g., Chrome 120 → 120)
IP Address: Anonymized based on privacy settings
The UUID Formula
UUID = SHA256(language | maskedIP | siteKey | timezoneBucket | browserVersion | screenBucket | osFamily | deviceType | canvasKey)
The result is a 50-character hash that remains consistent for the same visitor across sessions.
Privacy Features
IP Masking Levels
Mida supports configurable IP masking for privacy compliance:
Level | Masking | Example |
1 (default) | Last octet | 192.168.1.xxx → 192.168.1.0 |
2 | Last 2 octets | 192.168.xxx.xxx → 192.168.0.0 |
3 | Last 3 octets | 192.xxx.xxx.xxx → 192.0.0.0 |
GDPR Compliance (EU Servers)
When using Mida's EU servers, canvas fingerprinting is automatically disabled. Instead, a random session-based identifier is used, which provides less persistence but ensures GDPR compliance.
Accessing the Visitor UUID
Use the mida.uuid() method which returns a Promise that resolves once the UUID is available:
mida.uuid().then(function(visitorId) {
console.log('Visitor ID:', visitorId);
});
Important Notes
Consistency: The same visitor on the same device/browser will always receive the same UUID, ensuring consistent A/B test bucketing.
Cross-Device: UUIDs are device-specific. The same person on different devices will have different UUIDs.
Incognito Mode: Visitors in incognito/private browsing may receive different UUIDs each session due to canvas fingerprint variations.
Bot Filtering: Mida automatically filters out known bots and crawlers — they will not receive UUIDs.
