Contents

zunda-pixel/googleanalytics-swift

## GoogleAnalytics Measurement Protocol for Swift

GoogleAnalytics Measurement Protocol for Swift

GA4 Measurement Protocol

let client = GoogleAnalytics(
  httpClient: .urlSession(.shared),
  apiSecret: "bCab-SdfDBi2L3ZPaYHYfw",
  id: .firebase(
    firebaseAppId: "1:211175559289:ios:121555f3c816aecc3cd5d8",
    appInstanceId: UUID().uuidString.replacingOccurrences(of: "-", with: "")
  )
)

let sessionId = UUID().uuidString.replacingOccurrences(of: "-", with: "")

try await client.send(for: .login(
  method: "Email",
  sessionId: sessionId,
  engagementTime: 123
))

Package Metadata

Repository: zunda-pixel/googleanalytics-swift

Default branch: main

README: README.md