Analytical is a comprehensive analytics solution for iOS applications that provides developers with powerful tools to gather insights and data about app usage, user behavior, and more. This documentation will guide you through the process of integrating Analytical into your app and making the most out of its features.
## Installation
### Requirements
- iOS 10.0 or later
- Xcode 10 or later
### Steps
- Open your project in Xcode.
- Navigate to the root directory of your project.
- Open the Podfile and add the following line:
pod 'Analytical'
- Save the Podfile and run the following command in the terminal from the root directory of your project:
pod install
- Now, open your project using the workspace file (`.xcworkspace`) instead of the regular Xcode project file.
## Integration
### Import Analytical framework
import Analytical
### Initialization
- Inside your AppDelegate.swift file, add the following code:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Analytical.initialize()
return true
}
## Tracking Events
### Basic Event Tracking
### Steps
- To track a basic event, use the following code snippet:
Analytical.track(event: "eventName")
### Advanced Event Tracking
### Track Event with Properties
- You can track events with additional properties using the following code:
Analytical.track(event: "eventName", properties: ["key1": "value1", "key2": "value2"])
## Opt-Out Tracking
### Disable Tracking
- To disable tracking temporarily, use the following code:
Analytical.disableTracking()
### Enable Tracking
- To enable tracking again, use the following code:
Analytical.enableTracking()
## User Identification
### Set User Identifier
- You can set a user identifier using the following code:
Analytical.setIdentifier("userID")
### Clear User Identifier
- To clear the user identifier, use the following code:
Analytical.clearIdentifier()
## Documentation Index
### Analytical Documentation Topics: