Introduction
Welcome to the Clean Insights SDK documentation! This documentation provides detailed information on how to integrate and use the Clean Insights SDK in your iOS applications. The Clean Insights SDK allows you to track user events, measure user engagement, and gain valuable insights into the user behavior within your app.
Requirements
- iOS 9.0 or later
- Xcode 11 or later
- Swift 5 or later
Getting Started
To integrate the Clean Insights SDK into your iOS application, follow the steps below:
Step 1: Create a Clean Insights Account
If you haven’t done so already, sign up for a Clean Insights account at https://www.cleaninsights.com. Create a new project and retrieve your API Key. You will need this key in the next steps.
Step 2: Install the Clean Insights SDK
Install the Clean Insights SDK using the following steps:
# Add the Clean Insights SDK dependency to your project's Podfile: target 'YourProjectName' do pod 'CleanInsightsSDK' end # Run the following command in Terminal to install the SDK: $ pod install
Step 3: Import the Clean Insights SDK
In your app’s AppDelegate.swift file, import the Clean Insights SDK:
import CleanInsightsSDK
Step 4: Initialize the Clean Insights SDK
In the didFinishLaunchingWithOptions method of your AppDelegate.swift file, initialize the Clean Insights SDK with your API Key:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { CleanInsights.shared.initialize(apiKey: "YOUR_API_KEY") return true }
Step 5: Track User Events
With the Clean Insights SDK integrated, you can now start tracking user events. To track an event, use the following method:
CleanInsights.shared.trackEvent(event: "EVENT_NAME", properties: ["key1": "value1", "key2": "value2"])
Step 6: Measure User Engagement
The Clean Insights SDK provides various methods to measure user engagement. Some of the common methods are:
- Track screen views
- Track user sessions
- Track user retention
- Track user funnels
Step 7: Gain Valuable Insights
With the Clean Insights SDK, you can gain valuable insights into user behavior within your app. Analyze user data, user flows, and user retention to make informed decisions and improvements for your app.
Conclusion
Congratulations! You have successfully integrated the Clean Insights SDK into your iOS application. You can now track user events, measure user engagement, and gain valuable insights into user behavior. For further information and advanced SDK usage, please refer to the full documentation at https://www.cleaninsights.com/documentation.