In both my personal apps and Artsy Folio, I'm always after a deeper understanding of how people use the app. There's three ways to do this: ask users, watch users and track usage. I'd like to talk about the third of these.

We've experimented with quite a lot of analytics tools for the Artsy website, and it seemed fitting to do the same for our mobile app. We wanted the freedom to change the analytics tool without having to change the code, and so ARAnalytics was born.

ARAnalytics is the adaption of Analytical and Analytics.js to iOS. By using Cocoapods it became possible to set up the entire analytics stack with only a few lines of code in your Podfile.

1
2
  pod "ARAnalytics/Crashlytics"
  pod "ARAnalytics/Mixpanel"

The list of supported libraries is pretty vast ( TestFlight, Mixpanel, Localytics, Flurry, Google Analytics, KISSMetrics, Countly, Crittercism, Bugsnag and Crashlytics ) and the API for ARAnalytics tries to bridge any gaps it can find in the implementations.

ARAnalytics simplifies the API to two main parts of tracking; user details and events. User details are things like your internal ID for a user, and custom properties like your app's preferences, whilst events are temporal actions that are triggered based off user actions.

There is another tool worth mentioning and that is Analytics which is a new port of Analytics.js which does a similar simple API to different analytics providers but works by offloading the work to the server. I think there are advantages and disadvantages to both of these approaches, but I think one or the other should cover nearly all use cases!

ARAnalytics is available on Github at orta/ARAnalytics and documented on Cocoadocs (which Artsy proudly sponsors!)

Categories: analytics, aranalytics, ios


Comments