---
title: Product Analytics data capture - iOS
description: Access to acquisition analysis and lifetime metrics by implementing the Product Analytics data capture using the CSQ SDK
lastUpdated: 08 July 2026
source_url:
  html: https://docs.contentsquare.com/en/csq-sdk-ios/experience-analytics/set-up-product-analytics-data-capture/
  md: https://docs.contentsquare.com/en/csq-sdk-ios/experience-analytics/set-up-product-analytics-data-capture/index.md
---

> Documentation index: https://docs.contentsquare.com/llms.txt
> Use this file to discover all available pages before exploring further.

This page instructs how to set up Product Analytics data capture in combination with Experience Analytics.

1. Configure and start the SDK with `CSQ.start()`.

   * Product Analytics

     **AppDelegate.swift**

     ```swift
     import UIKit
     import ContentsquareSDK


     @UIApplicationMain
     class AppDelegate: UIResponder, UIApplicationDelegate {
       var window: UIWindow?


       func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // ...


         CSQ.start(
           environmentID: "YOUR_ENVIRONMENT_ID"
         )
       }
     }
     ```

     Find your environment ID

     `YOUR_ENVIRONMENT_ID` is either provided to you by Contentsquare or you can find it in **Account** > **Manage** > **Projects** > \[Select your project] > **Environments** within the [Product Analytics web app ↗](https://heapanalytics.com/app/).

   * CSQ Experience Platform (Early Access)

     **AppDelegate.swift**

     ```swift
     import UIKit
     import ContentsquareSDK


     @UIApplicationMain
     class AppDelegate: UIResponder, UIApplicationDelegate {
       var window: UIWindow?


       func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // ...


         CSQ.start(
           dataSourceID: "YOUR_DATASOURCE_ID"
         )
       }
     }
     ```

     Find your data source ID

     `YOUR_DATASOURCE_ID` is either provided to you by Contentsquare or you can find it in **Definitions** > **Data sources** > \[Expand your mobile data source] > \[Copy the App ID in step 1] within the [CSQ Experience Platform web app ↗](https://app.contentsquare.com/).

2. Enable autocapture with `.enableNativeAutocapture = true`.

   * Product Analytics

     **AppDelegate.swift**

     ```swift
     import UIKit
     import ContentsquareSDK


     @UIApplicationMain
     class AppDelegate: UIResponder, UIApplicationDelegate {
       var window: UIWindow?


       func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // ...


         CSQ.start(
           environmentID: "YOUR_ENVIRONMENT_ID",
           options: [
             .enableNativeAutocapture: true
           ]
         )
       }
     }
     ```

   * CSQ Experience Platform (Early Access)

     **AppDelegate.swift**

     ```swift
     import UIKit
     import ContentsquareSDK


     @UIApplicationMain
     class AppDelegate: UIResponder, UIApplicationDelegate {
       var window: UIWindow?


       func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // ...


         CSQ.start(
           dataSourceID: "YOUR_DATASOURCE_ID",
           options: [
             .enableNativeAutocapture: true
           ]
         )
       }
     }
     ```

3. (Optional) If your Product Analytics environment is hosted in the EU, set the `baseURL` option to `"https://mh.ba.contentsquare.net"`.

   * Product Analytics

     ```swift
     CSQ.start(
       environmentID: "YOUR_ENVIRONMENT_ID",
       options: [
         .baseURL: "https://mh.ba.contentsquare.net"
       ]
     )
     ```

   * CSQ Experience Platform (Early Access)

     ```swift
     CSQ.start(
       dataSourceID: "YOUR_DATASOURCE_ID",
       options: [
         .baseURL: "https://mh.ba.contentsquare.net"
       ]
     )
     ```

4. Add `.disablePageviewAutocapture = true`.

   * Product Analytics

     **AppDelegate.swift**

     ```swift
     import UIKit
     import ContentsquareSDK


     @UIApplicationMain
     class AppDelegate: UIResponder, UIApplicationDelegate {
     var window: UIWindow?


       func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // ...


         CSQ.start(
           environmentID: "YOUR_ENVIRONMENT_ID",
           options: [
             .enableNativeAutocapture: true,
             .disablePageviewAutocapture: true
           ]
         )
       }
     }
     ```

   * CSQ Experience Platform (Early Access)

     **AppDelegate.swift**

     ```swift
     import UIKit
     import ContentsquareSDK


     @UIApplicationMain
     class AppDelegate: UIResponder, UIApplicationDelegate {
     var window: UIWindow?


       func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // ...


         CSQ.start(
           dataSourceID: "YOUR_DATASOURCE_ID",
           options: [
             .enableNativeAutocapture: true,
             .disablePageviewAutocapture: true
           ]
         )
       }
     }
     ```
