Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-detect and send new installation #52

Open
kkostov opened this issue Jan 7, 2025 · 0 comments
Open

Auto-detect and send new installation #52

kkostov opened this issue Jan 7, 2025 · 0 comments

Comments

@kkostov
Copy link
Collaborator

kkostov commented Jan 7, 2025

Related to TelemetryDeck/SwiftSDK#225

"New installation" - when the SDK is started and no previous sessions are detected in local storage e.g.

    // if the recent sessions are empty, this must be the first start after installing the app
        if self.recentSessions.isEmpty {
            // this ensures we only use the date, not the time –> e.g. "2025-01-31"
            let todayFormatted = ISO8601DateFormatter.string(from: Date(), timeZone: .current, formatOptions: [.withFullDate])

            self.firstSessionDate = todayFormatted

            TelemetryDeck.internalSignal(
                "TelemetryDeck.Acquisition.newInstallDetected",
                parameters: ["TelemetryDeck.Acquisition.firstSessionDate": todayFormatted]
            )
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant