Modular Event Tracker in Swift

Modular Event Tracker in Swift

Refactoring iOS event tracking structure to make it more modular. Almost every iOS app other than very small hobby projects have a tracker architecture to measure and track analytic events. Sometimes its ...

Almost every iOS app other than very small hobby projects have a tracker architecture to measure and track analytic events. Sometimes its enough to implement either third party solution or in-house tracking solution, sometimes you should support both of these. Besides just implementing them, for the sake of the project, you want to keep tracking mechanism tidy too.

Since Trendyol iOS app is one of the most popular iOS apps in Turkey at the e-commerce category, we use both varieties of third party solutions and an in-house solution too for event tracking. Actually we had a tracking mechanism which has been performing well until the last quarter, however we have noticed that it won’t scale enough and comes with some problems as app grows. First take a look at the previous tracking solution we want to change, to see what are the problems here.

Let’s start with Tracking Service;

typealias TrackingParams = [String: Any]?

    enum TrackingService {
        case awesomeTracking(params: TrackingParams)
        case firebase(name: String, params: TrackingParams)
        case adjust(event: ADJEvent?)
        case facebook(facebookEvents: FacebookEvents)
    }

TrackingService is a basic enum that contains tracking options. As you can see, it consists of some of the popular third party solutions and one in-house solution named AwesomeTracking.

ios events tracker swift modular

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Top Swift iOS App Development Company in USA

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!

Best Swift App Development Company

Apple Swift App Development India: Mobile App Development India is an expert iOS Swift App Development company in India. We develop secure and robust mobile app solutions based on new Apple Swift language.

Laravel real time event broadcasting with socket.io example

Here, in this article i will share laravel real time event broadcasting with socket.io. we will use predis, queue, socket.io, laravel-echo-server.

Hire Dedicated Swift Developers

Want to create a native iOS application for your Startup? **[Hire Dedicated Swift Developers](https://hourlydeveloper.io/hire-dedicated-swift-developer/ "Hire Dedicated Swift Developers")** for end-to-end services like development, migration...

10 Free Online Resources To Learn Swift Language

Swift is a fast and efficient general-purpose programming language that provides real-time feedback and can be seamlessly incorporated.