Skip to main content

How Mida Visitor Identification Works

Updated over 2 months ago

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:

  1. Language Simplification: en-US → en

  2. Timezone Bucketing: America/New_York → America (region only)

  3. Screen Width Bucketing:

    1. < 768px → small

    2. 768-1023px → medium

    3. 1024-1439px → large

    4. ≥ 1440px → xlarge

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

  5. Device Type: mobile, tablet, or desktop

  6. Browser Version: Major version only (e.g., Chrome 120 → 120)

  7. 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

  1. Consistency: The same visitor on the same device/browser will always receive the same UUID, ensuring consistent A/B test bucketing.

  2. Cross-Device: UUIDs are device-specific. The same person on different devices will have different UUIDs.

  3. Incognito Mode: Visitors in incognito/private browsing may receive different UUIDs each session due to canvas fingerprint variations.

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

Did this answer your question?