Skip to content

Commit 070b8fc

Browse files
authored
Merge pull request #263 from TelemetryDeck/feat/enable-all-pirate-metrics
Enable private helpers
2 parents 5f20b9e + 17ab890 commit 070b8fc

File tree

4 files changed

+57
-8
lines changed

4 files changed

+57
-8
lines changed

Sources/TelemetryDeck/PirateMetrics/TelemetryDeck+Acquisition.swift

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import Foundation
22

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

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

32-
private static func leadConverted(
44+
/// Sends a telemetry signal indicating that a lead has been successfully converted.
45+
///
46+
/// - Parameters:
47+
/// - leadID: A unique identifier for the lead that was converted. Should match the identifier used in `leadStarted`.
48+
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
49+
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
50+
public static func leadConverted(
3351
leadID: String,
3452
parameters: [String: String] = [:],
3553
customUserID: String? = nil

Sources/TelemetryDeck/PirateMetrics/TelemetryDeck+Activation.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import Foundation
22

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

17-
private static func coreFeatureUsed(
22+
/// Sends a telemetry signal indicating that a core feature of the application has been used.
23+
///
24+
/// - Parameters:
25+
/// - featureName: The name of the core feature that was used.
26+
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
27+
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
28+
public static func coreFeatureUsed(
1829
featureName: String,
1930
parameters: [String: String] = [:],
2031
customUserID: String? = nil

Sources/TelemetryDeck/PirateMetrics/TelemetryDeck+Referral.swift

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import Foundation
22

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

23-
private static func userRatingSubmitted(
30+
/// Sends a telemetry signal indicating that a user has submitted a rating.
31+
///
32+
/// - Parameters:
33+
/// - rating: The rating value submitted by the user. Must be between 0 and 10 inclusive.
34+
/// - comment: An optional comment or feedback text accompanying the rating. Default is `nil`.
35+
/// - parameters: Additional parameters to include with the signal. Default is an empty dictionary.
36+
/// - customUserID: An optional custom user identifier. If provided, it overrides the default user identifier from the configuration. Default is `nil`.
37+
public static func userRatingSubmitted(
2438
rating: Int,
2539
comment: String? = nil,
2640
parameters: [String: String] = [:],

Sources/TelemetryDeck/PirateMetrics/TelemetryDeck+Revenue.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import Foundation
22

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

0 commit comments

Comments
 (0)