Checks and Flags
Device Fingerprinting
Overview
Alias employs device fingerprinting to identify and track unique devices used to submit survey responses. This feature helps detect duplicate submissions and maintain data quality by providing a stable identifier across browser sessions.
Implementation
Frontend Integration
- Import the fingerprinting script:
- The script automatically generates a
fingerprint_id
and stores it in the browser’s session storage.
API Integration
Request
Include the optional fingerprint_id
in your API request:
Response
When a fingerprint_id
is provided, the API returns a fingerprint_checks
object:
Field Descriptions
fingerprint_id
- Type:
string
- Required: No
- Description: A unique identifier generated by the fingerprinting script
- Source: Generated by
fingerprinting.js
and stored in session storage
fingerprint_checks
- Type:
object | null
- Fields:
- device_id: A stable, unique identifier for the participant’s device based on browser and system attributes
- duplicate: Boolean indicating if this device has previously submitted responses to the same survey
- error: Boolean indicating if there were any errors during fingerprint processing
Error Handling
The fingerprint_checks
object handles various scenarios:
-
No
fingerprint_id
provided:fingerprint_checks
will benull
-
Invalid
fingerprint_id
provided:fingerprint_checks.duplicate
will benull
- Other fields may still contain valid data
-
Fingerprinting error:
fingerprint_checks.error
will betrue
- Affected fields will be set to
null
Security Considerations
The device fingerprinting system:
- Provides a stable identifier across browser sessions
- Helps identify repeat participants
- Works independently of cookies or local storage
- Maintains user privacy by not collecting personally identifiable information
Best Practices
- Always handle cases where fingerprinting data might be unavailable
- Check the
error
field before relying on fingerprinting results - Consider fingerprinting as one of multiple signals for detecting duplicate submissions
- Implement appropriate error handling for cases where the fingerprinting script fails to load