Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import Foundation

extension TelemetryDeck {
private static func acquiredUser(
/// Sends a telemetry signal indicating that a user was acquired through a specific channel.
///
/// - Parameters:
/// - channel: The acquisition channel through which the user was acquired (e.g., "organic", "paid-search", "social-media").
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func acquiredUser(
channel: String,
parameters: [String: String] = [:],
customUserID: String? = nil
Expand All @@ -15,7 +21,13 @@ extension TelemetryDeck {
)
}

private static func leadStarted(
/// Sends a telemetry signal indicating that a lead has been initiated.
///
/// - Parameters:
/// - leadID: A unique identifier for the lead being tracked.
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func leadStarted(
leadID: String,
parameters: [String: String] = [:],
customUserID: String? = nil
Expand All @@ -29,7 +41,13 @@ extension TelemetryDeck {
)
}

private static func leadConverted(
/// Sends a telemetry signal indicating that a lead has been successfully converted.
///
/// - Parameters:
/// - leadID: A unique identifier for the lead that was converted. Should match the identifier used in `leadStarted`.
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func leadConverted(
leadID: String,
parameters: [String: String] = [:],
customUserID: String? = nil
Expand Down
15 changes: 13 additions & 2 deletions Sources/TelemetryDeck/PirateMetrics/TelemetryDeck+Activation.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import Foundation

extension TelemetryDeck {
private static func onboardingCompleted(
/// Sends a telemetry signal indicating that a user has completed the onboarding process.
///
/// - Parameters:
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func onboardingCompleted(
parameters: [String: String] = [:],
customUserID: String? = nil
) {
Expand All @@ -14,7 +19,13 @@ extension TelemetryDeck {
)
}

private static func coreFeatureUsed(
/// Sends a telemetry signal indicating that a core feature of the application has been used.
///
/// - Parameters:
/// - featureName: The name of the core feature that was used.
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func coreFeatureUsed(
featureName: String,
parameters: [String: String] = [:],
customUserID: String? = nil
Expand Down
18 changes: 16 additions & 2 deletions Sources/TelemetryDeck/PirateMetrics/TelemetryDeck+Referral.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import Foundation

extension TelemetryDeck {
private static func referralSent(
/// Sends a telemetry signal indicating that a referral has been sent.
///
/// - Parameters:
/// - receiversCount: The number of recipients who received the referral. Default is `1`.
/// - kind: An optional categorization of the referral type (e.g., "email", "social", "sms"). Default is `nil`.
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func referralSent(
receiversCount: Int = 1,
kind: String? = nil,
parameters: [String: String] = [:],
Expand All @@ -20,7 +27,14 @@ extension TelemetryDeck {
)
}

private static func userRatingSubmitted(
/// Sends a telemetry signal indicating that a user has submitted a rating.
///
/// - Parameters:
/// - rating: The rating value submitted by the user. Must be between 0 and 10 inclusive.
/// - comment: An optional comment or feedback text accompanying the rating. Default is `nil`.
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func userRatingSubmitted(
rating: Int,
comment: String? = nil,
parameters: [String: String] = [:],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import Foundation

extension TelemetryDeck {
private static func paywallShown(
/// Sends a telemetry signal indicating that a paywall has been shown to the user.
///
/// - Parameters:
/// - reason: The reason or context for showing the paywall (e.g., "trial-expired", "feature-locked", "onboarding").
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
public static func paywallShown(
reason: String,
parameters: [String: String] = [:],
customUserID: String? = nil
Expand Down