Tracking location

The SDK can track a user’s location by automatically logging location information with each event. Location tracking is disabled by default. To enable it, call the Medio.EventApi.setProperties method and set the trackLocation property to true. You need to set this property on every page where you wish to track location:

Medio.EventApi.setProperties({"trackLocation": true});

When your application enables location tracking, the SDK will obtain latitude and longitude information accurate to roughly the city level. The SDK will only check for new location information periodically using the most conservative method in terms of battery consumption.

Please be aware that you need to inform users of your privacy policy if you enable location tracking in your application.