We are pleased to announce a new release of the Snowplow iOS Tracker. Version 1.5.0 introduces tracker diagnostics that make spotting and diagnosing tracker issues easier. It also comes with a refactor of the Emitter and bug fix related to the writeSessionToFile method.

Snowplow iOS Tracker Version 1.5.0 is available on Cocoapods.

Read on below for:

  1. Tracker diagnostics
  2. Refactoring the Emitter
  3. Updates and bug fixes
  4. Documentation
  5. Getting help

1. Tracker diagnostics

The tracker diagnostics feature adds the ability for the tracker to report logs to the main app (GitHub issue #534) as well as to send them to a Snowplow collector (GitHub issue #533).

The tracker already managed errors internally, avoiding crashes of the app and assuring that no events are lost. Up to this point however, if an internal error compromises the behaviour of the tracker when the app is in production it is difficult to get information on what is going wrong inside the tracker.

This new feature allows the app to get the tracker logs, and you can decide which log level you want to filter logs to when you configure the tracker:

SPTracker *tracker = [SPTracker build:^(id<SPTrackerBuilder> builder) {
    ...
    [builder setLogLevel:SPLogLevelVerbose];
    ...
}];

There are four levels of logging: off (log disabled), error, debug, verbose.

The tracker can also report the errors to a configured Snowplow collector as diagnostic_error events. You can instrument this like so:

SPTracker *tracker = [SPTracker build:^(id<SPTrackerBuilder> builder) {
    ...
    [builder setDiagnosticLogger:self];
    ...
}];

More information on this can be found in the technical documentation.

2. Refactoring the Emitter

The Emitter is now split it into three parts (GitHub issue #540):

  • the EventStore: handles the persistence of tracked events not yet sent to the collector
  • the NetworkConnection: establishes the connection with the collector and performs the requests
  • the Emitter: handles dispatching, i.e. aggregation of events into a single request and backoff and retry of failed requests

The SPEmitter API is still the same, so the EventStore and the NetworkConnection can be configured automatically by the Emitter from the SPEmitter configuration. However, this setup improves testing and makes it easier to add new functionality in the future.

3. Updates and bug fixes

3. Documentation

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

You can find the full release notes on GitHub as Snowplow iOS 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 iOS Tracker’s issues on GitHub.