Implementation Details
  • 16 Apr 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Implementation Details

  • Dark
    Light
  • PDF

Article summary

Information on how the Mobile Library handles offline events and identifies visitors.

Performance and Data Queuing

Webtrends data collection supports both real-time data capture and offline event collection. This functionality requires the device to send event data to Webtrends data collection servers periodically. To ensure that sending data does not cause problems with device performance, the Webtrends libraries use the following strategies for queuing and sending data:

  • Collection events never use the thread the application is running on. This ensures that delays and exceptions in data collection do not interfere with application functionality or user experience.

  • Regardless of whether the device is connected to the Internet, all collection events are sent to a queue system. This allows the Library to pause or halt data collection based on a number of criteria. It also ensures that when the state of the device allows data sending, for example when an offline device comes back online, collection events are sent correctly.

Queuing behavior responds to a number of factors:

  • Offline status: Offline devices automatically queue collection events. The queue also has a limit to avoid overloaded queues in case of extended offline state.

  • Battery level: If battery level drops below a specified level, data collection stops temporarily.

Visitor Identification

During initialization, the library creates a unique visitor ID by retrieving a device-specific identifier. The identifier is hashed and base-64 encoded. If for some reason the identifier is not available, the library creates a custom identifier using a randomly generated alphanumeric string. The identifier is stored locally so that it can be re-used on subsequent application starts.

Here are the device identifier sources by platform:

___Android___: Hashed ANDROID_ID

___iOS___: Randomly generated ID

___BlackBerry___: Hashed PIN number

___Windows Phone 7___: Hashed DeviceUniqueId

Webtrends automatically generates visitor IDs based on these settings. However, the Webtrends product allows administrators to choose a custom-defined parameter to identify visitors. If you have your own visitor ID source, such as a user login or an internal system ID, you can pass this ID to event methods in the customData argument.


Was this article helpful?