Location tracking is the ability to identify the geographic location (latitude and longitude) of a user’s device. Permission must be granted to your app to allow for location tracking.
Location updates can be provided continuously, which results in higher accuracy, but requires more battery consumption.
If continuous tracking is disabled or not available, the user’s last known location can be retrieved with an explicit method call. This approach uses less battery and can be used in apps that do not require real-time location monitoring.
The following variables are added to the data later when location tracking is used. These variables are included automatically in each tracking call.
The latitude of the user’s most recently recorded location
The longitude of the user’s most recently recorded location
The accuracy setting, such as "high" or "low"
Geofencing is a location tracking service that combines awareness of the user’s location with the user’s proximity to a geofence. A geofence is a virtual perimeter surrounding an area of interest, specified by latitude, longitude, and a radius.
Geofencing uses three transition states to track a user’s interaction with a geofence. These transition states trigger tracking calls in the Tealium library. The following transition states are monitored:
The user entered a geofence
The user exited a geofence
tealium_event="geofence_dwell" (Android only)
The user stops for a defined duration within a geofence
The specifics of your geofencing is defined in a geofences file and provided to your app during initialization.
The following variables are tracked during geofencing transition states:
The Tealium tracked geofence event: "geofence_entered", "geofence_exited", or "geofence_dwell" (Android only)
The name of the geofence region
"Tealium San Diego"
The type of geofence transition event
"geofence_entered", "geofence_exited", or "geofence_dwell"(Android)
movement_speed (iOS only)
The instantaneous speed of the user, measured in meters per second
location_timestamp (iOS only)
The recorded date/time (GMT) the user entered/exited the geofence region
"2020-01-28 16:29:46 +0000"
Geofencing is enabled when a geofence file is provided during app initialization. A geofence file contains coordinates of points of interest and which transition states to track in JSON format.
When creating your geofence file, name the file geofences.json. Geofences are written as key-value pairs with the variables listed in the table below.
The geofence name as a unique string with words separated by underscores. Avoid using spaces, emojis and characters not supported by UTF-8 encoding.
The latitude coordinate of the center of the geofence as a decimal value between -90.0 and 90.0.
The longitude coordinate of the center of the geofence as a decimal value between -180.0 and 180.0.
The geofence radius value, in meters. Recommended value: 100+
The time, in milliseconds, that the geofence expires after. (Set to -1 to not expire)
Defines whether the geofence fires a tracking event when a user enters the area.
Defines whether the geofence fires a tracking event when a user exits the area.
The time, in milliseconds, a tracking event is fired when a user enters and stays in the geofence. Recommended for most use cases to avoid events repeatedly firing if a user keeps entering and exiting a geofence. (Set to 0 if trigger_on_enter is set to true)