1. Home
  2. Blog
  3. Releases
Releases

Snowplow iOS Tracker 1.4.0 released

We are pleased to announce a new release of the Snowplow iOS Tracker. Version 1.4.0 introduces improvements to event management, avoiding duplication of the event ID when the same event object is reused multiple times. It also unifies the different methods for tracking events into a single track method (similar to the Snowplow Android tracker). Additionally, version 1.4.0 brings support for setting the true_tstamp as well as other updates and bug fixes.

Snowplow iOS Tracker Version 1.4.0 is available on Cocoapods.

Read on below for:

  1. Avoid duplicate event IDs when reusing event objects
  2. Support for single track method (similar to Android)
  3. Support for setting the true timestamp
  4. Updates and bug fixes
  5. Documentation
  6. 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. If an event object is then tracked multiple times, i.e.

SPScreenView *event = [SPScreenView build:^(id builder) {
    [builder setName:@"Home screen"];
    [builder setType:@"Navigation bar"];
    [builder setTransitionType:@"swipe"]
}];

[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 issues #521. Furthermore, this can also lead to duplication of contexts in the same tracked event GitHub issue #524.

Version 1.4.0 moves the assignment of event ID into the event processing, so that the event object no longer contains it. This means you can now track the same event object multiple times, and each event will have a unique event ID and contexts will not be duplicated.

2. Support for a single track method (similar to Android)

Snowplow’s Android tracker uses a single track method for all the events tracked. To date, the iOS tracker has multiple specific track methods. However, as each event has a specific object type, sending each specific object type to a specific track method is redundant. Therefore we have simplified the tracker and it now uses a single track method for all events as well GitHub issue #518.

For example, previously a screen view would need to be tracked manually like so:

SPScreenView *event = [SPScreenView build:^(id builder) {
    [builder setName:@"Home screen"];
    [builder setType:@"Navigation bar"];
    [builder setTransitionType:@"swipe"]
}];

[tracker trackScreenViewEvent:event];

Now, it can simply be tracked like this:

SPScreenView *event = [SPScreenView build:^(id builder) {
    [builder setName:@"Home screen"];
    [builder setType:@"Navigation bar"];
    [builder setTransitionType:@"swipe"]
}];

[tracker track:event];

3. Support for setting the true timestamp

Version 1.4.0 also comes with support for the true_tstamp GitHub issue #276, an optional timestamp that can be manually set like so:

SPScreenView *event = [SPScreenView build:^(id builder) {
    ...
    // set true timestamp in seconds.
    [builder setTrueTimestamp:@([[NSDate date] timeIntervalSince1970])];
    ...
}];

This support was made possible by adding compatibility for the Snowplow payload_data schema version 1.0.4.

4. Updates and bug fixes

  • Validate eventData in Self-Describing events (#526), checking it’s a JSON serialisable dictionary.

  • Fix a url percent escaping issue (#525) reported on Discourse.

  • Move from Travis CI to GitHub Actions (#517).

5. 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.4.0 release.

6. 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.

More about
the author

Alex Benini
Alex Benini

Alex is a Solutions Engineer at Snowplow working on next generation mobile tracking features

View author

Unlock the value of your behavioral data with customer data infrastructure for AI, advanced analytics, and personalized experiences

Image of the Snowplow app UI