Snowplow Android Tracker 1.5.0 released

Alex Benini

We are pleased to announce Snowplow Android Tracker 1.5.0. Version 1.5.0 introduces improvements to event management, avoiding duplication of the event ID when the same event object is reused multiple times. Additionally, it includes reporting of processing errors in background threads so that they can be tracked using the diagnostics tracking introduced in version 1.4.0 as well.

Read on below for:

  1. Avoid duplicate event IDs when reusing event objects
  2. Report errors in background threads
  3. Updates and bug fixes
  4. Documentation
  5. Getting help

1. Avoid duplicate event IDs when reusing event objects

In previous versions, the event objects created by the user already contained the event_id and dvce_created_tstamp. If an event object is then tracked multiple times, i.e.

ScreenView event = ScreenView.builder()
                .name("screen1")
                .build();
tracker.track(event);
tracker.track(event);

This will lead to multiple events with the same event ID and device created timestamp being sent to the collector GitHub issue #390. Version 1.5.0 moves the assignment of event ID and device created timestamp into the event processing, so that the event object no longer contains them. This means you can now track the same event object multiple times, and each event will have a unique event ID.

2. Report errors in background threads

In version 1.4.0, trackerDiagnostic events were introduced. While the tracker always manages errors internally (avoiding crashes of the app and assuring that no events are lost), this new method enables the tracker to report errors to a Snowplow collector as diagnostic_error events. From 1.5.0, we now also report errors that happen in background threads GitHub issue #394. Therefore, the tracker can now report errors that occur during tracking and sending of events to the collector.

As long as diagnostic tracking is enabled, the errors occuring in background threads will be sent:

TrackerBuilder trackerBuilder =
    new TrackerBuilder(emitter, namespace, appId, appContext)
        .trackerDiagnostic(true)
        ...
        .build();
Tracker.init(trackerBuilder);

However, we do not track diagnostic_errors if the error happens during the tracking of a diagnostic_error to avoid getting stuck in a loop.

3. Updates and bug fixes

4. Documentation

As always, information about how to use the tracker can be found in the Android Tracker documentation.

You can find the full release notes on GitHub as Snowplow Android Tracker v1.5.0 release.

5. Getting help

For help on integrating the tracker please have a look at the setup guide. If you have any questions or run into any problems, please visit our Discourse forum. Please raise any bugs in the Android Tracker’s issues on GitHub.

Related articles