-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from orchidfire/main
Improve comments with cursor.so
- Loading branch information
Showing
17 changed files
with
535 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,58 @@ | ||
import Foundation | ||
|
||
/** | ||
* const | ||
* Constants for Telemetry | ||
*/ | ||
extension Telemetry { | ||
// Typealias for completion handler | ||
public typealias Complete = (_ success: Bool) -> Void | ||
|
||
// Base URL for Google Analytics | ||
internal static let baseURL: URL? = .init(string: "https://www.google-analytics.com/") | ||
} | ||
|
||
/** | ||
* variables | ||
* Variables for Telemetry | ||
*/ | ||
extension Telemetry { | ||
/** | ||
* Users IP should be anonymized | ||
* - Description: In order to be GDPR compliant, Telemetry will ask Google Analytics to anonymize users IP's by default. If you wish to opt-out of this you will neeed to set anonymizeIP to false. | ||
* Flag to anonymize user's IP | ||
* - Description: To ensure GDPR compliance, Telemetry requests Google Analytics to anonymize user IPs by default. Set this to false to opt-out. | ||
*/ | ||
public static var anonymizeIP = true | ||
|
||
/** | ||
* Google Analytics Identifier (Tracker ID) | ||
* - Remark: The token can be obtained from the admin page of the tracked Google Analytics entity. | ||
* - Remark: A valid Google Analytics tracker ID of form UA-XXXXX-XX must be set before reporting any events. | ||
* - Remark: This token can be obtained from the Google Analytics entity's admin page. | ||
* - Remark: A valid Google Analytics tracker ID (format: UA-XXXXX-XX) must be set before reporting any events. | ||
*/ | ||
public static var trackerId: String = "UA-XXXXX-XX" | ||
|
||
/** | ||
* Custom dimension arguments | ||
* - Description: Dictionary of custom key value pairs to add to every query. | ||
* - Remark: Use it for custom dimensions (cd1, cd2...). | ||
* - Note: More information on Custom Dimensions https://support.google.com/analytics/answer/2709828?hl=en | ||
* - Description: A dictionary of custom key-value pairs to be added to every query. | ||
* - Remark: Useful for custom dimensions (cd1, cd2...). | ||
* - Note: For more information on Custom Dimensions, visit https://support.google.com/analytics/answer/2709828?hl=en | ||
*/ | ||
public static var customDimArgs: [String: String]? | ||
|
||
/** | ||
* Options are: .vendor, .userdef, .keychain | ||
* - Remark: Type of persistence | ||
* - Fixme: ⚠️️ Rename to currentIdentifierType? or curIdType? | ||
* Identifier type | ||
* - Remark: Defines the type of persistence. Options are: .vendor, .userdef, .keychain | ||
* - Fixme: Consider renaming to currentIdentifierType or curIdType | ||
*/ | ||
public static var idType: IDType = .userdefault | ||
|
||
/** | ||
* Network, rename to urlSession | ||
* Network session | ||
* - Remark: Consider renaming to urlSession | ||
*/ | ||
public static let session = URLSession.shared | ||
|
||
/** | ||
* Telemetry type | ||
* - Description: A way to switch from ga-endpoint to aggregator-endpoint | ||
* - Fixme: ⚠️️ Rename to endPointType? EPType ? Maybe | ||
* - Description: Allows switching between ga-endpoint and aggregator-endpoint | ||
* - Fixme: Consider renaming to endPointType or EPType | ||
*/ | ||
public static var tmType: TMType = .ga // .agg() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import Foundation | ||
|
||
/** | ||
* With the help of Telemetry, Google Analytics is able to track events and screen views. The Google Analytics Measurement protocol, which is, is used in the class. (https://developers.google.com/analytics/devguides/collection/protocol/v1/reference). | ||
* - Remark: Since Google has officially discontinued the ability to track mobile analytics through Google Analytics, new apps are urged to use Firebase. | ||
* - Remark: This library transforms screen views into pageviews, and you must configure new tracking properties as websites in the Google Analytics admin console. | ||
* - Remark: The app bundle identifier, which can be set to any custom value for privacy purposes, will be used as a dummy hostname for tracking pageviews and screen views. | ||
* The Telemetry class facilitates event and screen view tracking using the Google Analytics Measurement protocol. | ||
* More details can be found here: https://developers.google.com/analytics/devguides/collection/protocol/v1/reference | ||
* | ||
* - Note: Google has officially discontinued mobile analytics tracking through Google Analytics. It is recommended for new apps to use Firebase instead. | ||
* - Note: This library converts screen views into pageviews. Therefore, new tracking properties must be configured as websites in the Google Analytics admin console. | ||
* - Note: The app bundle identifier, which can be customized for privacy reasons, is used as a dummy hostname for tracking pageviews and screen views. | ||
*/ | ||
public class Telemetry {} | ||
public class Telemetry {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.