Sending background hits

Utility of identification

Identification enables you to distinguish hits sent following direct usage of your application from hits sent in the background, automatically and independently of the user, with the help of background fetch or a background task for example.

Tagging

The tracker possesses a contextproperty, which possesses a subproperty, backgroundMode. This is BackgroundMode-type enumeration.

By default, this property is set to Normal. In the case of background fetch tagging, the property must be set to Fetch, and in all other cases of tagging automatic behaviours independent of the user, it should be set to Task.

To tag these types of functioning, it is recommended to use an instance of a dedicated tracker. If you wish to use just one tracker instance, you must remember to reset the property to Normalat the end of execution of background fetch or background task.