Trekker, easily combine and swap out multiple analytics services on iOS
A wrapper to easily swap out different analytics services or to support multiple analytics services at once. Trekker works best with event based analytics services like Mixpanel, Amplitude, Firebase, and Answers by Crashlytics.
Hi, we’re Awkward. We used many different analytics services for our iOS reddit client called Beam. We weren’t quite sure which service we wanted to use, so we wanted to make it easy to implement them all and switch between services on the fly. Trekker was born. We welcome you to use Trekker for your own projects.
Trekker.xcodeproj
into the project navigatorEmbedded Binaries
and select the Trekker
framework in the Trekker projectTrekkerService
)TrekkerService
)TrekkerService is the protocol that is implemented for every analytics service that is fed into Trekker.
Adding a Trekker is simple.
First add the framework of the analytics service to your app. There are ready build implementations for some services, see the example services folder.
If the service doesn’t have a ready implementation, a new subclass of NSObject should be made. It should implement the TrekkerService protocol. This requires implementing the following properties:
var serviceName: String // The name of the analytics service
var versionString: String // The version of the SDK of the analytics service
Now you can implement the following protocols for the features the analytics service supports:
TrekkerEventAnalytics
for simple event based analyticsTrekkerTimedEventAnalytics
for time event analytics, these events will often have an added duration
propertyTrekkerPushNotificationAnalytics
for services that allow sending push notification messagesTrekkerUserProfileAnalytics
for services that support user profilesTrekkerEventSuperPropertiesAnalytics
for services that support super properties. Properties that are included with every event.We’re trying to keep our documentation as updated as possible. Here you can find more information on Trekker.
Trekker is available under the MIT license. See the LICENSE file for more info.