Overview
Anonymous tracking mode allows you to track location events without creating identifiable user records on the Radar server. When enabled, Radar avoids sending stable device IDs, user IDs, and user metadata to the server, providing enhanced privacy for users.When to Use Anonymous Tracking
Use anonymous tracking when:- You need to comply with strict privacy regulations (GDPR, CCPA, etc.)
- You want to track aggregate location patterns without identifying individual users
- Users have opted out of personalized tracking
- You’re building a privacy-first application
- You need location features without user identification
Enabling Anonymous Tracking
Enable anonymous tracking before starting location tracking:Anonymous tracking can be enabled or disabled at any time. Changes take effect immediately for subsequent location updates.
How It Works
When anonymous tracking is enabled:No user records created
Radar does not create or update user records on the server. Each location update is treated independently.
Device ID is anonymized
Instead of sending the actual device ID (IDFV), Radar sends a generic
"anonymous" identifier.What Still Works
With anonymous tracking enabled, you can still use:Location tracking
trackOnce(), startTracking(), and all tracking methods work normally.Geofencing
Geofence entry and exit events are detected and delivered.
Place detection
Place entry, exit, and nearby events work as expected.
Region detection
Country, state, DMA, and postal code events are generated.
Client-side events
Delegate callbacks like
didReceiveEvents are called with event data.Context API
getContext() provides location context without user identification.What Doesn’t Work
With anonymous tracking enabled, these features are not available:User identification
User identification
You cannot call
setUserId(), setDescription(), setMetadata(), or setTags(). These values will not be sent to the server.User history
User history
The server does not maintain a history of locations or events for anonymous users. Each request is independent.
User state in callbacks
User state in callbacks
In
RadarDelegate callbacks, the user parameter will be nil when anonymous tracking is enabled.Trip tracking
Trip tracking
Trip tracking requires persistent user identity and is not available in anonymous mode.
Conversion tracking
Conversion tracking
logConversion() requires user identity and will not work properly in anonymous mode.Disabling Anonymous Tracking
You can disable anonymous tracking at any time:When you disable anonymous tracking, the next location update will create or update a user record with the device ID.
Privacy Compliance Example
Here’s an example of using anonymous tracking based on user consent:Server-Side Behavior
When anonymous tracking is enabled, Radar API requests will:- Include
"anonymous": truein the request payload - Use
"deviceId": "anonymous"instead of the actual device ID - Not create or update user records in the database
- Still return events and context in the response
- Not persist any user state on the server
Delegate Considerations
When implementingRadarDelegate with anonymous tracking:
Best Practices
Respect user choice
Always give users control over whether they want personalized or anonymous tracking.
Set before tracking starts
Enable anonymous mode before calling
startTracking() or trackOnce() to ensure no user data is sent.Clear user data when enabling
When switching to anonymous mode, clear any previously set user IDs and metadata.
Document the limitations
Make sure your app gracefully handles the limitations of anonymous mode (no user state, no history).