https://github.com/zunda-pixel/mixpanel-swift
Mixpanel API Client for Swift
https://github.com/zunda-pixel/mixpanel-swift
mixpanel swift
Last synced: 5 months ago
JSON representation
Mixpanel API Client for Swift
- Host: GitHub
- URL: https://github.com/zunda-pixel/mixpanel-swift
- Owner: zunda-pixel
- License: apache-2.0
- Created: 2025-03-02T09:12:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-09T04:52:35.000Z (12 months ago)
- Last Synced: 2025-06-09T05:28:25.535Z (12 months ago)
- Topics: mixpanel, swift
- Language: Swift
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Mixpanel Client
```swift
import Mixpanel
let clinet = Client(
httpClient: .urlSession(.shared)
)
let events: [Event] = [
Event(
id: 1,
event: "Sign Up",
properties: Properties(
token: "asdf5012321487dbasdf3250c12312e27178",
time: .now,
userId: "22222",
appVersion: "1.0",
screenHeight: 852,
screenWidth: 393,
model: "iPhone17,3",
deviceId: "3B03068A-CC08-1231-A036-C373123138C",
distinctId: "$device:3B231A-CC08-4434-A036-C31235B538C",
appBuildNumber: "1",
libVersion: "4.3.1",
radio: "NRNSA, LTE",
wifi: true,
osVersion: "18.4",
manufacturer: "Apple",
os: "iOS",
hadPersistedDistinctId: true
),
metadata: Metadeta(
sessionId: "0b0bd9d6a92cb38c",
sessionStartSec: .now,
eventId: "82cc5e35a1f9065f",
sessionSeqId: 0
)
)
]
try await clinet.track(events: events)
```