How to enable user location sending

AppMetrica can determine the location of a device. Location accuracy depends on the configuration that the library uses for initialization:

With the locationTracking option enabled

Note

For iOS, the option is enabled by default, but the AppMetrica SDK doesn't request permission to access location data. You should implement this using the methods of the CLLocationManager class.

The location is determined with city-level accuracy. You can retrieve the information in reports and via the Logs API.

The app requests GPS access. Battery consumption may increase.

With the locationTracking option disabled

Note

Starting with the Android AppMetrica SDK 5.0.0, the locationTracking option is disabled by default.

If the version is lower than 5.0.0, the locationTracking option is enabled by default.

The location is determined by the IP address with country-level accuracy. You can retrieve the information in reports but not the Logs API.

The app requests GPS access. Battery consumption does not increase.

Note

If you have IP address masking enabled, AppMetrica determines the location with country-level accuracy using the unmasked part of the IP address.

For more information about enabling and disabling the locationTracking option, see Sending location on Android and on iOS.

If you didn't find the answer you were looking for, you can use the feedback form to submit your question. Please describe the problem in as much detail as possible. Attach a screenshot if possible.

Contact support