---
title: SDK API reference - Flutter
description: SDK commands reference including signature, parameter descriptions, and examples
lastUpdated: 05 December 2025
source_url:
  html: https://docs.contentsquare.com/en/csq-sdk-flutter/product-analytics/command-reference/
  md: https://docs.contentsquare.com/en/csq-sdk-flutter/product-analytics/command-reference/index.md
---

## GDPR / Identification

### CSQ.optIn()

**Added in:** `1.0.0`

Get user consent.\
Calling this API generates a user ID and initiates tracking.

Call [optIn](#csqoptin) after [start](#csqstart).

* Swift

  ```swift
  CSQ.optIn()
  ```

* Objective-C

  ```objective-c
  [CSQ optIn];
  ```

#### Parameters

* No parameters.

### CSQ.optOut()

**Added in:** `1.0.0`

Revoke user consent, remove stored `userID`.\
Stop CSQ SDK, flush, and clear all data.

* Swift

  ```swift
  CSQ.optOut()
  ```

* Objective-C

  ```objective-c
  [CSQ optOut];
  ```

#### Parameters

* No parameters.

### CSQ.identify()

Product Analytics | **Added in:** `1.0.0`

Assigns an identity to be associated with the current user.

This assigns the identity to all events for the user ID and lets the analysis module merge multiple user IDs with the same identity.

This should be called only after Product Analytics is configured and the SDK started. It's safe to call multiple times with the same value. Please always provide a value that will be unique to this user. Setting values like "guest", "anonymous", "unauthenticated" or similar will merge all those users into a single user profile.

Warning

Changing an identity forces a new user ID and session ID. That is, calling `identify("A"); identify("B")` creates a new user ID and session for `B`.

* Swift

  ```swift
  CSQ.identify("userIdentity")
  ```

* Objective-C

  ```objective-c
  [CSQ identify:@"userIdentity"];
  ```

#### Parameters

* #### identity   String (<= 100 chars)  

  Identity to be associated with the current user.

### CSQ.resetIdentity()

**Added in:** `1.0.0`

If the user was previously identified with [`identify()`](#csqidentify), this creates a new unidentified user and session. This is technically similar to calling [`optOut()`](#csqoptout) then [`optIn()`](#csqoptin).

This should be called only after Product Analytics is configured and the SDK started.

* Swift

  ```swift
  CSQ.resetIdentity()
  ```

* Objective-C

  ```objective-c
  [CSQ resetIdentity];
  ```

#### Parameters

* No parameters.

### CSQ.metadata.\*\*\*\*\*

**Added in:** `1.0.0`

Get all the information related to the user and project.

#### CSQ.metadata.userID

Identifier of the current user. This is an identifier from Product Analytics by default or Experience Analytics if PA is not active.

* Swift

  ```swift
  let userID = CSQ.metadata.userID
  ```

* Objective-C

  ```objective-c
  NSString *userID = [[CSQ metadata] userID];
  ```

#### CSQ.metadata.sessionID

Session identifier. This is an identifier from Experience Analytics by default or Product Analytics if Experience Analytics is not active.

* Swift

  ```swift
  let sessionID = CSQ.metadata.sessionID
  ```

* Objective-C

  ```objective-c
  NSString *sessionID = [[CSQ metadata] sessionID];
  ```

#### CSQ.metadata.projectID

Project identifier for Experience Analytics.

* Swift

  ```swift
  let projectID = CSQ.metadata.projectID
  ```

* Objective-C

  ```objective-c
  NSString *projectID = [[CSQ metadata] projectID];
  ```

#### CSQ.metadata.environmentID

Environment identifier for Experience Analytics.

* Swift

  ```swift
  let environmentID = CSQ.metadata.environmentID
  ```

* Objective-C

  ```objective-c
  NSString *environmentID = [[CSQ metadata] environmentID];
  ```

#### CSQ.metadata.sessionReplayURL

URL of current session replay.

* Swift

  ```swift
  let sessionReplayURL = CSQ.metadata.sessionReplayURL
  ```

* Objective-C

  ```objective-c
  NSString *sessionReplayURL = [[CSQ metadata] sessionReplayURL];
  ```

#### CSQ.metadata.identity

Identity associated with the user by calling [`identify()`](#csqidentify).

* Swift

  ```swift
  let identity = CSQ.metadata.identity
  ```

* Objective-C

  ```objective-c
  NSString *identity = [[CSQ metadata] identity];
  ```

### CSQ.metadata.onChange { metadata in }

**Added in:** `1.0.0`

A block triggered each time user information is updated. For example when `sessionReplayURL` becomes available or `userID` updates. Set this block to subscribe to the updates. Contentsquare will call this block with updated metadata.

Note

This may not trigger on changes to Product Analytics data.

* Swift

  ```swift
  CSQ.metadata.onChange { metadata in
    // Handle information change
  }
  ```

* Objective-C

  ```objective-c
  [[CSQ metadata] onChange:^(CSQMetadata *metadata) {
    // Handle information change
  }];
  ```

#### Parameters

* #### metadata   Metadata  

  Metadata associated with the current user and project.

## Logging

### CSQ.debug.logLevel

**Added in:** `1.0.0`

Gets or sets the current log level.

* Swift

  ```swift
  CSQ.debug.logLevel = .debug
  ```

* Objective-C

  ```objective-c
  [[CSQ debug] setLogLevel:CSQLogLevelDebug];
  ```

#### Parameters

* #### level   Enum (CSQ.Log.Level)  

  Possible values: `none`, `trace`, `debug`, `info`, `warn`, `error`, or `important`.

### CSQ.debug.logChannel

Product Analytics | **Added in:** `1.0.0`

Gets or sets the `LogChannel` to which send log messages.

* Swift

  ```swift
  CSQ.debug.logChannel = customLogChannel
  ```

* Objective-C

  ```objective-c
  [[CSQ debug] setLogChannel:customLogChannel];
  ```

#### Parameters

* #### LogChannel   interface  

  The interface where log messages will be routed.

### LogChannel.printLog()

Product Analytics | **Added in:** `1.0.0`

Implement this function to route SDK logs to another location such as CocoaLumberjack, SwiftyBeaver, or similar logging libraries.\
The default implementation routes all logs through `os_log`.

* Swift

  ```swift
  class CustomLogChannel: LogChannel {
    func printLog(logLevel: Log.Level, message: () -> String, source: String?, file: String, line: UInt) {
      // your implementation
    }
  }
  ```

* Objective-C

  ```objective-c
  // not supported
  ```

#### Parameters

* No parameters.

## Property Tracking

### CSQ.addDynamicVar()

Experience Analytics | **Added in:** `1.0.0`

Adds dynamic variables to the session properties.\
This method allows you to pass `DynamicVar` object, representing a key-value pair that is scoped to the session.

* Swift

  ```swift
  let var1 = DynamicVar(key: "key1", value: "value1")
  let var2 = DynamicVar(key: "key2", value: 2)


  CSQ.addDynamicVar(var1)
  CSQ.addDynamicVar(var2)
  ```

* Objective-C

  ```objective-c
  CSQDynamicVar *var1 = [[CSQDynamicVar alloc] initWithKey:@"key1" stringValue:@"value1"];
  CSQDynamicVar *var2 = [[CSQDynamicVar alloc] initWithKey:@"key2" intValue:@2];


  [CSQ addDynamicVar:var1];
  [CSQ addDynamicVar:var2];
  ```

#### Parameters

* #### dVar   DynamicVar  

  The dynamic variable

  * #### key   String (<= 512 chars)  

    Dynamic variable key

  * #### intValue   UInt32  

    Dynamic variable integer value

  * #### stringValue   String  

    Dynamic variable string value

### CSQ.addUserProperties()

Product Analytics | **Added in:** `1.0.0`

Add a collection of properties to be associated with the current user.

* Swift

  ```swift
  CSQ.addUserProperties(["propertyKey"": "propertyValue"])
  ```

* Objective-C

  ```objective-c
  [CSQ addUserProperties:@{@"propertyKey": @"propertyValue"}];
  ```

#### Parameters

* #### properties   \[String: PropertyValue]  

  A dictionary of user properties. `PropertyValue` in Swift can be `String`, `Substring`, `Bool`, `Double`, `Float`, `Int`, `Int64`, `Int32`, `Int16` or `Int8` or in Objective-C `NSString` and `NSNumber` (including `BOOL`).

### CSQ.addEventProperties()

Product Analytics | **Added in:** `1.0.0`

Add a collection of properties to be associated with all future events.

* Swift

  ```swift
  CSQ.addEventProperties(["propertyKey": "propertyValue"])
  ```

* Objective-C

  ```objective-c
  [CSQ addEventProperties:@{@"propertyKey": @"propertyValue"}];
  ```

#### Parameters

* #### properties   \[String: PropertyValue]  

  A dictionary of event properties. `PropertyValue` in Swift can be `String`, `Substring`, `Bool`, `Double`, `Float`, `Int`, `Int64`, `Int32`, `Int16` or `Int8` or in Objective-C `NSString` and `NSNumber` (including `BOOL`).

### CSQ.removeEventProperty()

Product Analytics | **Added in:** `1.0.0`

Removes a single property from the collection of event-wide properties.

* Swift

  ```swift
  CSQ.removeEventProperty("propertyKey")
  ```

* Objective-C

  ```objective-c
  [CSQ removeEventProperty:@"propertyKey"];
  ```

#### Parameters

* #### key   String  

  The key of the property to remove.

### CSQ.clearEventProperties()

Product Analytics | **Added in:** `1.0.0`

Removes all event-wide properties.

* Swift

  ```swift
  CSQ.clearEventProperties()
  ```

* Objective-C

  ```objective-c
  [CSQ clearEventProperties];
  ```

## View Tracking

### UIScrollView\.excludeFromExposureMetrics()

Experience Analytics | **Added in:** `1.0.0`

Exclude a scrollable view or subclass from Exposure Metric computations.

* Swift

  ```swift
  let scrollView = UIScrollView()
  scrollView.excludeFromExposureMetrics()
  ```

* Objective-C

  ```objective-c
  UIScrollView *scrollView = [[UIScrollView alloc] init];
  [scrollView excludeFromExposureMetrics];
  ```

## CSInApp

### CSQ.handle()

Experience Analytics | **Added in:** `1.0.0`

Allows the Contentsquare SDK to monitor CS in-app features activation through a custom URL scheme.

For more details check our [CSInApp documentation](../../experience-analytics/in-app-features/).

* Swift

  ```swift
  CSQ.handle(url: <CSInAppURL>))
  ```

* Objective-C

  ```objective-c
  [CSQ handleWithURL:<CSInAppURL>];
  ```

#### Parameters

* #### url   URL  

  See [https://developer.apple.com/documentation/foundation/url ↗](https://developer.apple.com/documentation/foundation/url)

### CSQ.csInApp

Experience Analytics | **Added in:** `1.0.0`

Boolean to manually activate or deactivate in-app features.

When `CSQ.csInApp = true`, the in-app function is activated automatically at app start.

* Swift

  ```swift
  CSQ.csInApp = true
  ```

* Objective-C

  ```objective-c
  CSQ.csInApp = YES;
  ```

## Interoperability

### CSQ.registerWebView()

Experience Analytics | **Added in:** `1.0.0`

Register a webview for tracking.

* Swift

  ```swift
  let webView = WKWebView()
  CSQ.registerWebView(webView)
  ```

* Objective-C

  ```objective-c
  WKWebView *webView = [[WKWebView alloc] init];
  [CSQ registerWebView:webView];
  ```

#### Parameters

* #### webView   WKWebView  

  The webview to register for tracking.

### CSQ.unregisterWebView()

**Added in:** `1.0.0`

Unregister a webview for tracking.

* Swift

  ```swift
  CSQ.unregisterWebView(webView)
  ```

* Objective-C

  ```objective-c
  [CSQ unregisterWebView:webView];
  ```

#### Parameters

* #### webView   WKWebView  

  The webview to unregister from tracking.

## Event Tracking

### CSQ.trackTransaction()

Experience Analytics | **Added in:** `1.0.0`

Send a transaction.

* Swift

  ```swift
  let transaction = Transaction(id: "transactionId", total: 100.0, currency: .usd)
  CSQ.trackTransaction(transaction)
  ```

* Objective-C

  ```objective-c
  CSQTransaction *transaction = [[CSQTransaction alloc] initWithId:@"transactionId" total:100.0 currency:CSQCurrencyUsd];
  [CSQ trackTransaction:transaction];
  ```

#### Parameters

* #### Transaction   Transaction  

  The transaction object to be sent. Initialized with id, total and ISO 4217 currency enum.

### CSQ.trackScreenview()

**Added in:** `1.0.0`

Send a screen view with or without custom variables. Requires Experience Analytics to be started.

* Swift

  ```swift
  CSQ.trackScreenview(name: "ScreenName", cvars: [CustomVar(index: 1, name: "name", value: "value")])
  ```

* Objective-C

  ```objective-c
  [CSQ trackScreenview:@"ScreenName" cvars:@[[CSQCustomVar initWithIndex:@1 name:@"name" value:@"value"]]];
  ```

#### Parameters

* #### name   String  

  The name of the screen.

* #### cvars   CustomVar\[] (optional)  

  An array of custom variables to attach to the screen view.

  * #### index   UInt32  

    Custom variable index

  * #### key   String (<= 512 chars)  

    Custom variable key

  * #### value   String (<= 256 chars)  

    Custom variable value

### CSQ.trackEvent()

Product Analytics | **Added in:** `1.0.0`

Creates an event message to be tracked and sent to the API.

* Swift

  ```swift
  CSQ.trackEvent(name: String, properties: ["propertyKey": "propertyValue"]?)
  ```

* Objective-C

  ```objective-c
  [CSQ trackEventWithName:@"EventName" properties:@{@"propertyKey": @"propertyValue"}];
  ```

#### Parameters

* #### name   String  

  The name of the event to be tracked.

* #### properties   \[String: PropertyValue>] (optional)  

  Optional properties to associate with the event. `PropertyValue` in Swift can be `String`, `Substring`, `Bool`, `Double`, `Float`, `Int`, `Int64`, `Int32`, `Int16` or `Int8` or in Objective-C `NSString` and `NSNumber` (including `BOOL`).

## Surveys

### CSQ.triggerSurvey()

Experience Analytics Voice of Customer | **Added in:** `1.0.0`

Triggers a survey by referencing a predefined trigger name.

This method allows your mobile app to trigger surveys at specific moments in the user journey. Triggers act as flexible placeholders that are not bound to individual surveys, enabling your business team to assign or update surveys later without requiring code changes.

* Swift

  ```swift
  CSQ.triggerSurvey(triggerName)
  ```

* Objective-C

  ```objective-c
  [CSQ triggerSurvey:triggerName];
  ```

#### Parameters

* #### triggerName   String  

  The name of the trigger associated with the survey. This should match the trigger name configured in the Contentsquare platform.

#### Example

* Swift

  ```swift
  // Trigger a survey after a purchase is completed
  CSQ.triggerSurvey("purchase-complete")
  ```

* Objective-C

  ```objective-c
  // Trigger a survey after a purchase is completed
  [CSQ triggerSurvey:@"purchase-complete"];
  ```

## Error tracking

### CSQ.setUrlMaskingPatterns()

Experience Analytics | **Added in:** `1.0.0`

Sets URL masking patterns.

* Swift

  ```swift
  CSQ.setUrlMaskingPatterns(["pattern1", "pattern2"])
  ```

* Objective-C

  ```objective-c
  [CSQ setUrlMaskingPatterns:@[@"pattern1", @"pattern2"]];
  ```

#### Parameters

* #### patterns   \[String]  

  A list of URL patterns to mask.

### CSQ.onCrashReporterStart()

Experience Analytics | **Added in:** `1.0.0`

Trigger a callback when the Contentsquare Crash Reporter is initialized.

* Swift

  ```swift
  CSQ.onCrashReporterStart { enabled in
    // do your work here, e.g. start Firebase Crashlytics
  }
  ```

* Objective-C

  ```objective-c
  [CSQ onCrashReporterStart:^(BOOL enabled) {
      // do your work here, e.g. start Firebase Crashlytics
  }];
  ```

#### Parameters

* #### onCrashReporterStart   (enabled: Bool -> Void)  

  Closure triggered when crash reporter is started. Passes a boolean indicating if crash reporter is actually enabled.

### CSQ.sendUserIdentifier()

Experience Analytics | **Added in:** `1.0.0`

Associate the user identifier to the session.

* Swift

  ```swift
  CSQ.sendUserIdentifier("any_identifier")
  ```

* Objective-C

  ```objective-c
  [CSQ sendUserIdentifier:@"any_identifier"];
  ```

#### Parameters

* #### userIdentifier   String  

  The user identifier to track. Should be max 100 characters long.

### CSQ.trackNetworkMetric()

Experience Analytics | **Added in:** `1.0.0`

Track network metrics.

* Swift

  ```swift
  let networkMetric = NetworkMetric(url: "https://example.com", httpMethod: "GET")
  CSQ.trackNetworkMetric(networkMetric)
  ```

* Objective-C

  ```objective-c
  CSQNetworkMetric *networkMetric = [[CSQNetworkMetric alloc] initWithURL:@"https://example.com" httpMethod:@"GET"];
  [CSQ trackNetworkMetric:networkMetric];
  ```

#### Parameters

* #### networkMetric   NetworkMetric  

  NetworkMetric object for a network request to collect HTTP network errors.

## Personal Data/Masking

### CSQ.ignoreInteractions()

**Added in:** `1.0.0`

Ignore interactions for a specific view.

* Swift

  ```swift
  CSQ.ignoreInteractions(view)
  ```

* Objective-C

  ```objective-c
  [CSQ ignoreInteractions:view];
  ```

#### Parameters

* #### view   UIView  

  [https://developer.apple.com/documentation/uikit/uiview ↗](https://developer.apple.com/documentation/uikit/uiview)

### UIView\.csqIgnoreInteractions

UIKit IBInspectable | **Added in:** `1.0.0`

Ignore interactions for a specific view.

* Swift

  ```swift
  view.csqIgnoreInteractions = true
  ```

* Objective-C

  ```objective-c
  view.csqIgnoreInteractions = YES;
  ```

#### Parameters

* No parameters.

### View\.csqIgnoreInteractions()

Product Analytics SwiftUI | **Added in:** `1.2.0`

Ignore interactions for a specific view.

* Swift

  ```swift
  Text("Hello World!").csqIgnoreInteractions(shouldIgnore: true)
  ```

#### Parameters

* #### shouldIgnore   Bool  

  Whether to ignore interactions.

### CSQ.setDefaultMasking()

Experience Analytics | **Added in:** `1.0.0`

Set the default masking state.\
All UIView elements, their subclasses and SwiftUI components are fully masked by default.

* Swift

  ```swift
  CSQ.setDefaultMasking(true)
  ```

* Objective-C

  ```objective-c
  [CSQ setDefaultMasking:YES];
  ```

#### Parameters

* #### masked   Bool  

  The default masking state to be set.

### CSQ.mask(UIView)

**Added in:** `1.0.0`

Mask a view’s content.

* Swift

  ```swift
  CSQ.mask(view)
  ```

* Objective-C

  ```objective-c
  [CSQ mask:view];
  ```

#### Parameters

* #### view   UIView  

  The view which content will be masked.

### CSQ.unmask(UIView)

**Added in:** `1.0.0`

Unmask a view’s content.

* Swift

  ```swift
  CSQ.unmask(view)
  ```

* Objective-C

  ```objective-c
  [CSQ unmask:view];
  ```

#### Parameters

* #### view   UIView  

  The view which content will be unmasked.

### UIView\.csqMaskContents

UIKit IBInspectable | **Added in:** `1.0.0`

Mask the content of a view.

* Swift

  ```swift
  view.csqMaskContents = true
  ```

* Objective-C

  ```objective-c
  view.csqMaskContents = YES;
  ```

#### Parameters

* No parameters.

### View\.csqMaskContents

SwiftUI | **Added in:** `1.0.0`

Mask the content of a view.

* Swift

  ```swift
  Text("Hello World!").csqMaskContents(true)
  ```

#### Parameters

* #### enable   Bool  

  Whether to mask the content of the view.

### CSQ.mask(`viewsOfType: UIView.Type`)

Experience Analytics | **Added in:** `1.0.0`

Mask content for views of a specific type.

* Swift

  ```swift
  CSQ.mask(viewsOfType: UIView.Type)
  ```

* Objective-C

  ```objective-c
  [CSQ maskViewsOfType:[UIView class]];
  ```

#### Parameters

* #### viewsOfType   UIView\.Type  

  The class type of the view whose content will be masked.

### CSQ.unmask(`viewsOfType: UIView.Type`)

**Added in:** `1.0.0`

Unmask content for views of a specific type.

* Swift

  ```swift
  CSQ.unmask(viewsOfType: UIView.self)
  ```

* Objective-C

  ```objective-c
  [CSQ unmaskViewsOfType:[UIView class]];
  ```

#### Parameters

* #### viewsOfType   UIView\.Type  

  The class type of the view whose content will be unmasked.

### CSQ.maskTexts()

**Added in:** `1.0.0`

Mask all texts.

* Swift

  ```swift
  CSQ.maskTexts(true)
  ```

* Objective-C

  ```objective-c
  [CSQ maskTexts:YES];
  ```

#### Parameters

* #### mask   Bool  

  Whether to mask text.

### CSQ.maskImages()

Experience Analytics | **Added in:** `1.0.0`

Mask images.

* Swift

  ```swift
  CSQ.maskImages(true)
  ```

* Objective-C

  ```objective-c
  [CSQ maskImages:YES];
  ```

#### Parameters

* #### mask   Bool  

  Whether to mask images.

### CSQ.maskTextInputs()

Experience Analytics | **Added in:** `1.0.0`

Mask text input fields.

* Swift

  ```swift
  CSQ.maskTextInputs(true)
  ```

* Objective-C

  ```objective-c
  [CSQ maskTextInputs:YES];
  ```

#### Parameters

* #### mask   Bool  

  Whether to mask text inputs.

### UIView\.csqIgnoreInnerHierarchy

Product Analytics UIKit IBInspectable | **Added in:** `1.0.0`

If set on a view or view controller, all touches inside that control will be attributed to it rather than child views. This can be helpful in blocking sensitive parts of an interaction and keeping implementation details out of a view hierarchy. For example, Contentsquare uses this property internally to suppress inner touches on `UIDatePicker`.

* Swift

  ```swift
  let view = UIView()
  view.csqIgnoreInnerHierarchy = true
  ```

* Objective-C

  ```objective-c
  UIView *view = [[UIView alloc] init];
  view.csqIgnoreInnerHierarchy = YES;
  ```

## SDK Initialisation and Management

### CSQ.configureProductAnalytics()

Product Analytics | **Added in:** `1.0.0`

SDK configuration method for Product Analytics. Must be called before [`start()`](#csqstart).

* Swift

  ```swift
  CSQ.configureProductAnalytics(
    environmentID: "YOUR_ENVIRONMENT_ID",
    additionalOptions: [ PRODUCT_ANALYTICS_INITIALIZATION_OPTIONS ]
  )
  ```

* Objective-C

  ```objective-c
  [CSQ configureProductAnalyticsWithEnvironmentID:@"YOUR_ENVIRONMENT_ID"
                                  additionalOptions:@{PRODUCT_ANALYTICS_INITIALIZATION_OPTIONS}
  ];
  ```

#### Parameters

* #### environmentID   String  

  Your Product Analytics environment ID.

* #### PRODUCT\_ANALYTICS\_INITIALIZATION\_OPTIONS   \[Option: Any]  

  Product Analytics [initialization options](#product-analytics-initialization-options).

### CSQ.start()

**Added in:** `1.0.0`

Start the SDK.

* Swift

  ```swift
  CSQ.start()
  ```

* Objective-C

  ```objective-c
  [CSQ start];
  ```

#### Parameters

* No parameters.

### CSQ.stop()

**Added in:** `1.0.0`

Stop all activity from the SDK.\
Once run no requests, telemetry collection, or logs will be generated.

* Swift

  ```swift
  CSQ.stop()
  ```

* Objective-C

  ```objective-c
  [CSQ stop];
  ```

### CSQ.pauseTracking()

**Added in:** `1.0.0`

Pause all tracking features.

* Swift

  ```swift
  CSQ.pauseTracking()
  ```

* Objective-C

  ```objective-c
  [CSQ pauseTracking];
  ```

### CSQ.resumeTracking()

**Added in:** `1.0.0`

Resume all tracking features.

* Swift

  ```swift
  CSQ.resumeTracking()
  ```

* Objective-C

  ```objective-c
  [CSQ resumeTracking];
  ```

#### Parameters

* No parameters.

## Product Analytics initialization options

CSQ SDK options for Product Analytics passed to [`CSQ.configureProductAnalytics()`](#csqconfigureproductanalytics).

* Swift

  ```swift
  CSQ.configureProductAnalytics(
    environmentID: String,
    additionalOptions: [
      .uploadInterval: TimeInterval,
      .baseURL: URL,
      .captureVendorID: Bool,
      .captureAdvertiserID: Bool,
      .clearEventPropertiesOnNewUser: Bool,
      .disablePageviewAutocapture: Bool,
      .disablePageviewTitleCapture: Bool,
      .disableInteractionAutocapture: Bool,
      .enableUIKitAutocapture: Bool,
      .enablePushNotificationAutocapture: Bool,
      .enablePushNotificationTitleAutocapture: Bool,
      .enablePushNotificationBodyAutocapture: Bool,
      .messageBatchByteLimit: Int,
      .messageBatchMessageLimit: Int,
      .resumePreviousSession: Bool,
      .pruningLookBackWindow: Bool,
      .disableScreenviewForwardToDXA: Bool,
      .disableScreenviewForwardToPA: Bool
    ]
  )
  ```

* Objective-C

  ```objective-c
  [CSQ configureProductAnalyticsWithEnvironmentID: NSString
    additionalOptions:@{
      CSQProductAnalyticsOptionUploadInterval: NSTimeInterval,
      CSQProductAnalyticsOptionBaseURL: NSURL,
      CSQProductAnalyticsOptionCaptureVendorID: BOOL,
      CSQProductAnalyticsOptionCaptureAdvertiserID: BOOL,
      CSQProductAnalyticsOptionClearEventPropertiesOnNewUser: BOOL,
      CSQProductAnalyticsOptionDisablePageviewAutocapture: BOOL,
      CSQProductAnalyticsOptionDisablePageviewTitleCapture: BOOL,
      CSQProductAnalyticsOptionDisableInteractionAutocapture: BOOL,
      CSQProductAnalyticsOptionEnableUIKitAutocapture: BOOL,
      CSQProductAnalyticsOptionEnablePushNotificationAutocapture: BOOL,
      CSQProductAnalyticsOptionEnablePushNotificationTitleAutocapture: BOOL,
      CSQProductAnalyticsOptionEnablePushNotificationBodyAutocapture: BOOL,
      CSQProductAnalyticsOptionMessageBatchByteLimit: NSInteger,
      CSQProductAnalyticsOptionMessageBatchMessageLimit: NSInteger,
      CSQProductAnalyticsOptionResumePreviousSession: BOOL,
      CSQProductAnalyticsOptionPruningLookBackWindow: NSInteger,
      CSQProductAnalyticsOptionDisableScreenviewForwardToDXA: BOOL,
      CSQProductAnalyticsOptionDisableScreenviewForwardToPA: BOOL
    }];
  ```

### `environmentID`

Product Analytics Environment ID.

### `uploadInterval`

Interval at which event batches should be uploaded to the API.\
Defaults to 15 seconds.

### `baseURL`

URI object specifying the base URI for the desired API endpoint. The Heap SDK resolves paths using this base URI and ignores any pre-existing path elements.

### `captureVendorID`

Whether or not the vendor ID should be included in tracked events if made available by the device.\
Defaults to false.

### `captureAdvertiserID`

Whether or not the advertiser ID should be included in tracked events if made available by the device.\
Defaults to false.

### `clearEventPropertiesOnNewUser`

Whether or not to clear event properties when a new user is created.\
Defaults to false.

### `disablePageviewAutocapture`

Whether or not source pageview events will be auto-captured.\
Defaults to false.

### `disablePageviewTitleCapture`

Disable pageview title capture.

### `disableInteractionAutocapture`

Disables autocapture of touch events on UIKit, Android Views, and React Native.

### `enableUIKitAutocapture`

Enable Product Analytics iOS View events.

### `enablePushNotificationAutocapture`

Whether or not the SDK will auto capture interaction events on notifications.\
Defaults to false.

### `enablePushNotificationTitleAutocapture`

Whether or not capture the title of the notification where an interaction was performed. `enablePushNotificationAutocapture` must be to true.\
Defaults to false.

### `enablePushNotificationBodyAutocapture`

Whether or not capture the body text of the notification where an interaction was performed. `enablePushNotificationAutocapture` must be to true.\
Defaults to false.

### `messageBatchByteLimit`

The maximum size, in bytes, to allocate for the local event storage database.\
Defaults to -1, meaning there is no limit on database size. Must be greater than or equal to 200KB.

### `messageBatchMessageLimit`

The maximum number of messages to be included in each batch sent to Heap. Setting a lower limit can help reduce network traffic in situations where bandwidth is limited.\
Defaults to 100.

### `resumePreviousSession`

Enables Contentsquare behavior of persisting non-expired sessions across app launch.

### `pruningLookBackWindow`

The number of days to look back when pruning old data in days.\
Defaults to 6 days.\
Requires an entitlement to use.

### `disableScreenviewForwardToDXA`

Disable forwarding of Product Analytics Pageviews to Experience Analytics.

### `disableScreenviewForwardToPA`

Disable forwarding of Experience Analytics Screenviews to Product Analytics.
