Skip to main content

How Mida Visitor Identification Works

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

  • Supports Strict Consent Mode, where no persistent ID is created before consent

  • 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

height

Screen height in pixels

colorDepth

Screen colour depth

ua

User agent string (used to detect the operating system, device type and, on iOS, the iOS version)

Server-Side Processing

The server combines these signals with the visitor's IP address to generate a deterministic UUID:

  1. Language: the full browser language (e.g., en-US)

  2. Timezone: the full timezone (e.g., America/New_York)

  3. Screen size: the exact screen size as a short side × long side pair (e.g., 390x844), so rotating the device gives the same value

  4. Colour depth: the screen colour depth

  5. OS Family Detection: Windows, macOS, Linux, Android, iOS, or other

  6. Device Type: mobile, tablet, or desktop

  7. iOS version: on iOS devices only, the iOS and Safari version

  8. IP Address: masked based on your IP masking setting (see below). For Apple iCloud Private Relay addresses, which many people share, the full relay IP is used in the hash so different visitors aren't grouped together. It is only used inside the hash and is never stored

The UUID Formula

UUID = SHA256("v2" | language | maskedIP | projectKey | timezone | screenSize | colorDepth | osFamily | deviceType | iosVersion)

The result is a 50-character hash that remains consistent for the same visitor across sessions. Visitors who were identified with Mida's older method are reconnected to their existing ID, so their history and assigned variants are kept.

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

Strict Consent Mode

If you use Strict Consent Mode, Mida doesn't create a persistent visitor ID or a visitor record before the visitor gives consent. The visitor ID described above is only created after consent.

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

  1. Consistency: The same visitor on the same device and network receives the same UUID, ensuring consistent A/B test bucketing. This also applies in a different browser on the same device and after clearing cookies.

  2. Cross-Device: UUIDs are device-specific. The same person on a different device, a different network or with a different screen size gets a different UUID.

  3. Incognito Mode: Incognito/private browsing on the same device and network gives the same UUID, so it shows the same variant. To be assigned again while testing, add ?mida-refresh to the URL. See I keep seeing the same variant.

  4. Bot Filtering: Mida automatically filters out known bots and crawlers — they will not receive UUIDs.

Did this answer your question?