Analytics

Track the most important events


SwiftSail features analytics functionality provided by MixPanel.

Tracking analytics and events is essential if you want to really understand you users and how they behave.

In SwiftSail, you can track events by using the AnalyticsService like this:

AnalyticsService.shared.log(event: .newTaskCreated)

It's also built on top of clean architecture principles and so replacing MixPanel for a different kind of analytics tool is very simple.

Settings up MixPanel

  1. Create your account with MixPanel here
  2. Create new project for your app
  3. Grab your API key for the project
  4. Paste the API key into Constants.swift file

Then you can think about what events you'd like to track and add them to the enums like AnalyticsEvent and AnalyticsPropertyKey for different parameters you want to track as well.