Trackers
Mobile (HTTP ingest)
Tracera does not currently ship native mobile SDKs. The ingest protocol is mobile-ready — use plain HTTP from your iOS or Android app today.
Ingest from iOS
struct TraceraEvent: Codable {
let p: String // public key
let t: String // "screen" | "event"
let u: String // path like /onboarding/step-2
let n: String? // event name
let d: [String: AnyCodable]?
}
func track(_ event: TraceraEvent) async throws {
var req = URLRequest(url: URL(string: "https://tracera.eu/i")!)
req.httpMethod = "POST"
req.setValue("application/json", forHTTPHeaderField: "Content-Type")
req.httpBody = try JSONEncoder().encode(event)
_ = try await URLSession.shared.data(for: req)
}
Ingest from Android
fun track(name: String, props: Map<String, Any> = emptyMap()) {
val body = mapOf(
"p" to "pk_a3f09c2e71bd",
"t" to "event",
"n" to name,
"d" to props
)
// Use OkHttp / Ktor as you like; POST JSON body to https://tracera.eu/i
}
Property type
When creating the property in the portal, pick ios or android and add the bundle ID / package name.
Sessions and app lifecycle
Web sessions use a 30-minute inactivity window. For mobile, treat backgrounding as the session end (foreground = new session if > 30 min).