Skip to content
trackd.one

Apps

iOS & macOS (Swift)

Analytics for iOS, iPadOS, macOS, tvOS, watchOS and visionOS — no dependencies, no IDFA, no App Tracking Transparency prompt.

Overview

  • No IDFA, no IDFV, no device model, no install id — nothing persistent, no fingerprinting.
  • Nothing is written to disk (no UserDefaults, files or Keychain).
  • Batched delivery via an ephemeral URLSession (no cookies, no cache) with a neutral User-Agent: trackd-ios/<version>.
  • Ships a privacy manifest (PrivacyInfo.xcprivacy).

Requirements: Xcode 15+ (Swift 5.9), iOS 13+ / macOS 11+ / tvOS 13+ / watchOS 7+ / visionOS 1+.

Install

A tagged Swift package is coming. Until then copy into your app target:

macOS (sandboxed, Mac Catalyst): enable Outgoing Connections (Client):

<key>com.apple.security.network.client</key>
<true/>

Setup

import SwiftUI

@main
struct MyApp: App {
    init() {
        Trackd.configure(websiteId: "YOUR_WEBSITE_ID")
    }
    var body: some Scene { WindowGroup { ContentView() } }
}

UIKit: call Trackd.configure(...) in application(_:didFinishLaunchingWithOptions:) on the main thread. In the dashboard, create a project with your bundle id as domain.

API

Trackd.screen("Home")                                   // screen view
Trackd.screen("Settings/Profile", title: "Profile")
Trackd.event("signup", data: ["plan": "pro", "trial": true])
Trackd.revenue(4.99, currency: "EUR", orderId: "order-123")   // → event "purchase"
Trackd.flush()
Trackd.setEnabled(false)                                // opt-out: stop + clear queue

// Game & media helpers
Trackd.gameStart(level: 1, mode: "hard")
Trackd.levelComplete(5, score: 1200, timeMs: 45_000)
Trackd.gameOver(3, reason: "fell")

SwiftUI screen tracking

struct SettingsView: View {
    var body: some View {
        Form { /* … */ }
            .trackScreen("Settings")      // or .onAppear { Trackd.screen("Settings") }
    }
}

UIKit: call Trackd.screen("Home") in viewDidAppear(_:). Never put user data into screen names.

App Store privacy

Usage Data → Product Interaction and Location → Coarse Location (country, derived server-side), not linked, not used for tracking, purpose Analytics. Add Purchases → Purchase History if you use revenue. Tracking: No.

Batching & sessions

Flush at 20 events, after 30 s, on flush() and when the app enters the background (finished via performExpiringActivity). Max. 50 events per request, 500 queued; retries with exponential backoff. The session id lives in memory only and rotates after 30 minutes of inactivity.

Ready in minutes

Create a free account, add your website or app, copy the snippet.

Start for free