--- title: Getting Started - Android (classic) description: Integrate the Contentsquare SDK into your Android app in minutes (installation, user consent, screen tracking, and testing) lastUpdated: 03 June 2026 source_url: html: https://docs.contentsquare.com/en/android/ md: https://docs.contentsquare.com/en/android/index.md --- > Documentation index: https://docs.contentsquare.com/llms.txt > Use this file to discover all available pages before exploring further. The latest CSQ SDK is here! Learn how to [upgrade your app](https://docs.contentsquare.com/en/csq-sdk-android/experience-analytics/upgrade-from-cs-sdk/). Welcome to the SDK implementation guide! This guide is designed to help you seamlessly integrate our SDK into your application. By following the outlined steps, you'll be able to collect and analyze data from your app, within just a few minutes. ## Install the SDK Our Android SDK is shipped as an Android library (AAR) which you need to add as a dependency to your Gradle file. See [Compatibility](compatibility/) for more information. ### Include the SDK For distribution of our API we use **Maven Central Repository** which is supported by the Android build system by default. To add our SDK (or library), add the following line to your application's dependency list. * Groovy **build.gradle** ```groovy implementation "com.contentsquare.android:library:4.52.1" ``` * Kotlin **build.gradle.kts** ```kotlin implementation("com.contentsquare.android:library:4.52.1") ``` The SDK autostarts when your application launches, requiring no manual initialization. If you are using an older Kotlin version, see [Compatibility](compatibility/). ### Validate SDK integration Start your application, and check logs for this output: ```text CSLIB: Contentsquare SDK 4.52.1 starting in app: com.example.testapp ``` ## Check the logs Contentsquare provides logging capabilities that allow you to inspect the raw event data logged by your app in Android Studio, or on the Contentsquare platform. To view all logs, you must [enable in-app features](#enable-in-app-features): logging is linked to in-app features being enabled or disabled. ### Viewing logs in Android Studio To view SDK logs: 1. Plug your Android phone into your computer (or use an emulator) 2. Open Android Studio and start your app 3. Open the `Logcat` view and select your phone or emulator 4. Filter logs by `CSLIB` ![](https://docs.contentsquare.com/_astro/logs-android.DcmHNl7a_1VAzm1.webp) ### Enable in-app features In-app features are essential for your implementation, as it includes key functionalities like screenshot creation and replay configuration. To enable in-app features within your app, make sure your app is launched in the background. To do so, start it and press the Android home button. Then, follow the appropriate method described as follows. If access is blocked by the Android OS, you may need to allow the restricted settings first. To do this, go to your device settings, navigate to **Apps**, tap on your app, open the **More** menu (three dots), and then tap on **Allow restricted settings**. #### On a device: scan the QR code In Contentsquare, select the Mobile icon in the menu top bar and scan the QR code with your phone. ![Scan the QR Code (Android)](https://docs.contentsquare.com/_astro/log-visualizer-access-qr.DnZz71r7_905Is.webp) Note On Android, some devices have a built-in QR code reader feature in the default camera app. If that is not the case for you, use the [QR & Barcode Reader by TeaCapps ↗](https://play.google.com/store/apps/details?id=com.teacapps.barcodescanner\&hl=en\&gl=US). #### On an emulator: use the ADB command If you are using an emulator, use the ADB command to enable in-app features. In Contentsquare, select the Mobile icon in the menu top bar then select your application ID, and "Copy this ADB command". ![](https://docs.contentsquare.com/_astro/log-visualizer-access-adb.BaJqetXO_zt9bH.webp) The following command is copied to the clipboard: ```shell adb shell "am start -W -a android.intent.action.VIEW -d cs-{{packageName}}://contentsquare.com?activationKey={{uniqueActivationKey}}\&userId={{userId}}" ``` To run the ADB command: 1. Plug your Android phone into your Computer (or use an emulator). 2. Make sure that only one phone or emulator is connected or running. 3. Start Android Studio. 4. Open the Terminal view. 5. Paste the ADB command into the Terminal and press `Enter`. 6. Switch to your phone or emulator and follow the steps on the screen. ### Contentsquare Log Visualizer Log Visualizer is a feature integrated into the Contentsquare SDK. As you navigate and interact with your app, it provides a live view of events detected by the SDK, visible directly on the [Contentsquare platform ↗](https://app.contentsquare.com/#/analyze/mobile-log). Prerequisite To use Log Visualizer, `Activate SDK logs stream` must be toggled on within in-app settings. 1. Start your app. 2. Select the Mobile icon in the menu top bar then select `Log Visualizer`. 3. Select the device to inspect. At this stage, you should see an 'App start' or 'App show' event being logged. ![Log visualizer Android app start](https://docs.contentsquare.com/_astro/log-visualizer-app-start.CjWWxzSe_1CiJ7F.webp) ## Get user consent Contentsquare collects usage data from your app users. To start tracking, you need your users' consent for being tracked. ### User opt-in The SDK treats users as **opted-out by default.** To start tracking, forward user consent with `optIn()`. Calling this method generates a user ID and initiates tracking. Handle user consent by implementing a UI for privacy preferences. Assuming you have an opt-in screen with a button to give consent, the code could look like this: * Java ```java import com.contentsquare.android.Contentsquare; Button optinButton = ... optinButton.setOnClickListener(view -> { Contentsquare.optIn(); // Then finish initialization and move to the next screen... }); ``` * Kotlin ```kotlin import com.contentsquare.android.Contentsquare val optinButton: Button = ... optinButton.setOnClickListener { Contentsquare.optIn() // Then finish initialization and move to the next screen... } ``` Going further For advanced configuration regarding user consent or personal data handling, see [Privacy](https://docs.contentsquare.com/en/android/privacy/). ## Track your first screens Contentsquare aggregates the user behavior and engagement at the screen level. Start your SDK implementation by tracking key screens like the home screen, product list, product details, or conversion funnel. ### Sending screenview events Screen tracking is achieved by sending a `screenview` event each time a new screen is displayed on the user's device. To trigger a screenview each time an activity becomes visible, place the call in the `onResume()` method (XML layouts only): * Java ```java import com.contentsquare.android.Contentsquare; public class MyActivity extends Activity { @Override public void onResume() { super.onResume(); // Send screenView Contentsquare.send("screen_name"); } } ``` * Kotlin ```kotlin import com.contentsquare.android.Contentsquare class MyActivity : Activity() { override fun onResume() { super.onResume() // Send screenView Contentsquare.send("screen_name") } } ``` #### Jetpack Compose support To enable Jetpack Compose support, add a new dependency to your Gradle build file. * Groovy **build.gradle** ```groovy implementation 'com.contentsquare.android:compose:4.52.1' ``` * Kotlin **build.gradle.kts** ```kotlin implementation("com.contentsquare.android:compose:4.52.1") ``` Attention must be paid to recompositions. The call should be wrapped using `TriggeredOnResume` to ensure only one screenview is triggered when a given screen is presented to the user. ```kotlin import com.contentsquare.android.Contentsquare import com.contentsquare.android.compose.analytics.TriggeredOnResume @Composable fun MyComposable(data: Data) { TriggeredOnResume { Contentsquare.send("screen_name") } // ... } ``` ### Implementation recommendations From a functional perspective, a screenview should be triggered in the following cases: * When the screen appears on the device * When a modal or pop-up is displayed * When a modal or pop-up is closed, returning the user to the screen * When the app is brought back to the foreground (after being minimized) Specific triggers Depending on how your app is built (Popups, Webviews, Redirections, etc...), you might need specific implementation use cases for triggering screenview events. See the [dedicated section on screen tracking](https://docs.contentsquare.com/en/android/track-screens/#implementation-recommendations). #### Tracking app launch Most events collected by the SDK require a screenview event to be sent first so they can be associated with that screen; otherwise, they will be discarded. If you need to collect events from the moment the app launches, you should trigger a screenview event immediately after the SDK has started. Refer to [our guide](https://docs.contentsquare.com/en/android/track-screens/#when-to-send-your-first-screenview) for implementation examples. #### Screen name handling It is necessary to provide a name for each screen when calling the screenview API. As a general rule, keep distinct screen names under 100. As they are used to map your app in Contentsquare, you will want something comprehensive. The screen name length is not limited on the SDK side. However, the limit is 2083 characters on the server side. More on [screen name handling](https://docs.contentsquare.com/en/android/track-screens/#how-to-name-screens). Tracking plan To get the most out of your data, it's best to follow a tracking plan. This way, you'll capture every step of the user's journey without missing important interactions, giving you a complete picture of how your app is used. ## Test your setup Testing your SDK implementation is essential to make sure data is being accurately captured and reported. To test your setup, simulate user interactions in your app and check that the events are logged correctly in our analytics platform. You can also use debugging tools such as Android Studio or Log Visualizer to monitor data transmission and ensure everything is running smoothly. ### Visualize events in Contentsquare Use [Log Visualizer](#contentsquare-log-visualizer) to view incoming events within the Contentsquare pipeline. This allows you to monitor the stream in real time. By simulating user activity, you see incoming screenview and gesture events. ![Log visualizer Android activity](https://docs.contentsquare.com/_astro/log-visualizer-activity.x9zqNXUC_3mvS0.webp) ### Visualize data in Contentsquare Data availability Data must be sessionized (meaning all events for a single session are gathered together) before it can be visualized. This requires the session to have ended, which happens 30 minutes after the last event is received. Therefore, you can expect to see the first replays 30 minutes after the last interaction with the app. #### In Journey Analysis [Open Journey Analysis ↗](https://app.contentsquare.com/#/analyze/navigation-path) in Contentsquare and visualize the user journeys main steps across your app, screen by screen. ![](https://docs.contentsquare.com/_astro/check-data-journay-analysis.CjaeeRjK_1Iime.webp) See how to use Journey Analysis on the [Help Center ↗](https://support.contentsquare.com/hc/en-us/articles/37271761254161). #### In Session Replay [Open Session Replay ↗](https://app.contentsquare.com/#/session-replay) in Contentsquare and replay the full user session across your app. ![](https://docs.contentsquare.com/_astro/check-data-session-replay.Cvuj2X01_HiOzM.webp) See how to use Session Replay on the [Help Center ↗](https://support.contentsquare.com/hc/en-us/articles/37271667148561) ## Sample app To explore some of these features in context, check our Android sample app. ### [android-sample-app](https://github.com/ContentSquare/android-sample-app) [A sample app giving an example implementation of the Contentsquare SDK](https://github.com/ContentSquare/android-sample-app) [Kotlin](https://github.com/ContentSquare/android-sample-app) ## Next steps While screen tracking gives an overview of user navigation, capturing session, screen, or user metadata provides a deeper understanding of the context behind user behavior. Our SDK offers a wide range of features to enhance your implementation, including Session Replay, Error Monitoring, extended tracking capabilities, and personal data masking. Proceed with these how-to's to refine your implementation. [Custom Variables](https://docs.contentsquare.com/en/android/track-custom-variables/)Collect additional details about the screen or the user. [Dynamic Variables](https://docs.contentsquare.com/en/android/track-dynamic-variables/)Collect additional information about the session. [Transactions tracking](https://docs.contentsquare.com/en/android/track-transactions/)Associate user's session with their potential purchases and corresponding revenue. [WebViews](https://docs.contentsquare.com/en/android/track-webviews/)For native apps which embark web applications or pages. [Session Replay](https://docs.contentsquare.com/en/android/session-replay/)Collect data for Session Replay in compliance personal data masking. [Error Analysis](https://docs.contentsquare.com/en/android/error-analysis/)Track API errors and application crashes with automated collection and privacy-safe debugging tools. ```json {"@context":"https://schema.org","@type":"TechArticle","headline":"Getting Started","description":"Integrate the Contentsquare SDK into your Android app in minutes (installation, user consent, screen tracking, and testing)","url":"https://docs.contentsquare.com/en/android/","inLanguage":"en","dateModified":"2026-06-03T22:01:55+02:00","publisher":{"@type":"Organization","name":"Contentsquare","url":"https://www.contentsquare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://docs.contentsquare.com/#website","name":"Contentsquare Technical Documentation","url":"https://docs.contentsquare.com/"}} ``` --- title: Getting Started - Capacitor description: Integrate Contentsquare SDKs into your Capacitor apps in minutes (installation, user consent, screen tracking, and testing) lastUpdated: 07 April 2026 source_url: html: https://docs.contentsquare.com/en/capacitor/ md: https://docs.contentsquare.com/en/capacitor/index.md --- > Documentation index: https://docs.contentsquare.com/llms.txt > Use this file to discover all available pages before exploring further. Welcome to the SDK implementation guide! This guide is designed to help you seamlessly integrate our SDK into your application. By following the outlined steps, you'll be able to collect and analyze data from your app, within just a few minutes. ## Install the SDK The SDK is shipped as a Capacitor plugin which you need to add as a dependency to your Capacitor application. See [Compatibility](compatibility/) for more information. ### Include the SDK Install the plugin as follows, specifying the exact version you want to install if needed: ```shell npm install @contentsquare/capacitor-plugin npx cap sync ``` You do not need to do anything to start the SDK. Now that the SDK is a dependency of your app, it will autostart itself when your application starts. ### Validate SDK integration Start your application, and check logs for this output: * Android Studio ```text CSLIB: Contentsquare SDK 7.1.1 starting in app: com.example.testapp ``` * Xcode ```text CSLIB ℹ️ Info: Contentsquare SDK v7.1.1 starting in app: com.example.testapp ``` ## Check the logs Contentsquare provides logging capabilities that allow you to inspect the raw event data logged by your app in Android Studio, Xcode, or on the Contentsquare platform. To view all logs, you must [enable in-app features](#enable-in-app-features): logging is linked to in-app features being enabled or disabled. ### Viewing local logs in IDE * Android To view SDK logs: 1. Plug your Android phone into your computer (or use an emulator) 2. Open Android Studio and start your app 3. Open the `Logcat` view and select your phone or emulator 4. Filter logs by `CSLIB` ![](https://docs.contentsquare.com/_astro/logs-android.DcmHNl7a_1VAzm1.webp) * iOS 1. Unless you are using a simulator, ensure the device you are using is connected to your Mac or is on the same Wi-Fi network. 2. Open the macOS Console app or Xcode. For the macOS Console app, make sure info messages are included at [Choose Action > Include Info Messages ↗](https://support.apple.com/guide/console/customize-the-log-window-cnsl35710/mac). 3. Filter logs by `CSLIB`. ![](https://docs.contentsquare.com/_astro/logs-ios.BkLL-Bb7_Z1Ovm29.webp) ### Implement in app-features Note This step only applies to iOS. In-app features are essential for your implementation, as it includes key functionalities like screenshot creation and replay configuration. To allow Contentsquare users to enable in-app features, perform these tasks: 1. [Add the custom URL scheme in your app Info](#1-add-the-custom-url-scheme-in-your-app-info) 2. [Call the SDK when the app is launched via a deeplink](#2-call-the-sdk-when-the-app-is-launched-via-a-deeplink) #### 1. Add the custom URL scheme in your app Info You have to allow your app to be opened via a custom URL scheme which can be done using one of the following methods: ##### Xcode 1. Open your project settings 2. Select the app target 3. Select the `Info` settings 4. Scroll to `URL Types` 5. Set the URL scheme to `cs-$(PRODUCT_BUNDLE_IDENTIFIER)` ##### Text editor 1. Open the `Info.plist` of your project 2. Add the following snippet: **Info.plist** ```xml CFBundleURLTypes CFBundleURLSchemes cs-$(PRODUCT_BUNDLE_IDENTIFIER) ``` #### 2. Call the SDK when the app is launched via a deeplink Depending on the project, there are multiple ways to handle the deeplink opening. Choose the method matching your project structure: * AppDelegate In your `AppDelegate` class, complete or implement the function `application(app, open url:, options:)` with: `Contentsquare.handle(url: url)` * SceneDelegate In your `WindowSceneDelegate` class, you need to: 1. Update `func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions)` with: ```swift if let url = connectionOptions.urlContexts.first?.url { Contentsquare.handle(url: url) } ``` 2. Complete or implement `func scene(_ scene: UIScene, openURLContexts URLContexts: Set)` with: ```swift if let url = URLContexts.first?.url { Contentsquare.handle(url: url) } ``` * SwiftUI In the `body` of your main App struct, add the `onOpenURL` modifier and call the `Contentsquare` SDK to handle the URL: ```swift @main struct MyApp: App { var body: some Scene { WindowGroup { MyView() .onOpenURL { url in Contentsquare.handle(url: url) } } } } ``` ### Enable in-app features To enable in-app features within your app, you have to **first make sure your app is launched in the background**. Then, follow the appropriate method described as follows. #### On a device: scan the QR code * Android In Contentsquare, select the Mobile icon in the menu top bar and scan the QR code with your phone. ![Scan the QR Code (Android)](https://docs.contentsquare.com/_astro/log-visualizer-access-qr.DnZz71r7_905Is.webp) * iOS In Contentsquare, select the Mobile icon in the menu top bar and scan the QR code with your phone. ![Scan the QR Code (iOS)](https://docs.contentsquare.com/_astro/log-visualizer-access-qr.BMM1NnUy_1kl8Dd.webp) #### On an emulator/simulator * Android In Contentsquare, select the Mobile icon in the menu top bar then select your application ID, and "Copy this ADB command". ![](https://docs.contentsquare.com/_astro/log-visualizer-access-adb.BaJqetXO_zt9bH.webp) * iOS In Contentsquare, select the Mobile icon in the menu top bar then select your Bundle ID, and select "Copy this link". Paste it in Safari on your simulator to trigger the in-app features. ![](https://docs.contentsquare.com/_astro/log-visualizer-access-custom-link.BcDGrin1_1QRynb.webp) ### Contentsquare Log Visualizer Log Visualizer is a feature integrated into the Contentsquare SDK. As you navigate and interact with your app, it provides a live view of events detected by the SDK, visible directly on the [Contentsquare platform ↗](https://app.contentsquare.com/#/analyze/mobile-log). Prerequisite To use Log Visualizer, `Activate SDK logs stream` must be toggled on within in-app settings. 1. Start your app. 2. Select the Mobile icon in the menu top bar then select `Log Visualizer`. 3. Select the device to inspect. At this stage, you should see an 'App start' or 'App show' event being logged. * Android ![Log visualizer Android app start](https://docs.contentsquare.com/_astro/log-visualizer-app-start.CjWWxzSe_1CiJ7F.webp) * iOS ![Log visualizer iOS app start](https://docs.contentsquare.com/_astro/log-visualizer-app-start.BMUhGlzy_ZUr40e.webp) ## Get user consent Contentsquare collects usage data from your app users. To start tracking, you need your users' consent for being tracked. Warning You are responsible for handling the UI asking users for their consent and allowing them to manage their privacy settings. Consult our [Privacy Center ↗](https://contentsquare.com/privacy-center/) and [Privacy Policy ↗](https://contentsquare.com/privacy-center/privacy-policy/). ### User opt-in The SDK treats users as **opted-out by default.** Forward user consent with `optIn()`. Calling this method generates a user ID and initiates tracking. ```javascript import { ContentsquarePlugin } from "@contentsquare/capacitor-plugin"; ContentsquarePlugin.optIn(); ``` Going further For advanced configuration regarding user consent or personal data handling, see [Privacy](https://docs.contentsquare.com/en/capacitor/privacy/). ## Track your first screens Contentsquare aggregates the user behavior and engagement at the screen level. Start your SDK implementation by tracking key screens like the home screen, product list, product details, or conversion funnel. ### Sending screenview events Screen tracking is achieved by sending a `screenview` event each time a new screen is displayed on the user's device. ```javascript import { ContentsquarePlugin } from "@contentsquare/capacitor-plugin"; ContentsquarePlugin.sendScreenName(screenName).catch((err) => { // Handle error }); ``` ### Implementation recommendations From a functional perspective, a screenview should be triggered in the following cases: * When the screen appears on the device * When a modal or pop-up is displayed * When a modal or pop-up is closed, returning the user to the screen * When the app is brought back to the foreground (after being minimized) #### Screen name handling It is necessary to provide a name for each screen when calling the screenview API. As a general rule, keep distinct screen names under 100. As they are used to map your app in Contentsquare, you will want something comprehensive. The screen name length is not limited on the SDK side. However, the limit is 2083 characters on the server side. More on [screen name handling](https://docs.contentsquare.com/en/capacitor/track-screens/#how-to-name-screens). Tracking plan To get the most out of your data, it's best to follow a tracking plan. This way, you'll capture every step of the user's journey without missing important interactions, giving you a complete picture of how your app is used. ## Test your setup Testing your SDK implementation is essential to make sure data is being accurately captured and reported. To test your setup, simulate user interactions in your app and check that the events are logged correctly in our analytics platform. You can also use debugging tools such as Android Studio, Xcode, or Log Visualizer to monitor data transmission and ensure everything is running smoothly. ### Visualize events in Contentsquare Use [Log Visualizer](#contentsquare-log-visualizer) to view incoming events within the Contentsquare pipeline. This allows you to monitor the stream in real time. By simulating user activity, you see incoming screenview and gesture events. * Android ![Log visualizer Android activity](https://docs.contentsquare.com/_astro/log-visualizer-activity.x9zqNXUC_3mvS0.webp) * iOS ![Log visualizer iOS activity](https://docs.contentsquare.com/_astro/log-visualizer-activity.DpcYyP1k_ZQkq96.webp) ### Visualize data in Contentsquare Data availability Data must be sessionized (meaning all events for a single session are gathered together) before it can be visualized. This requires the session to have ended, which happens 30 minutes after the last event is received. Therefore, you can expect to see the first replays 30 minutes after the last interaction with the app. #### In Journey Analysis [Open Journey Analysis ↗](https://app.contentsquare.com/#/analyze/navigation-path) in Contentsquare and visualize the user journeys main steps across your app, screen by screen. ![](https://docs.contentsquare.com/_astro/check-data-journay-analysis.CjaeeRjK_1Iime.webp) See how to use Journey Analysis on the [Help Center ↗](https://support.contentsquare.com/hc/en-us/articles/37271761254161). #### In Session Replay [Open Session Replay ↗](https://app.contentsquare.com/#/session-replay) in Contentsquare and replay the full user session across your app. ![](https://docs.contentsquare.com/_astro/check-data-session-replay.Cvuj2X01_HiOzM.webp) See how to use Session Replay on the [Help Center ↗](https://support.contentsquare.com/hc/en-us/articles/37271667148561) ## Sample app To explore some of these features in context, check our Capacitor sample app. ### [capacitor-sample-app](https://github.com/ContentSquare/capacitor-sample-app) [A sample app giving an example implementation of the Contentsquare SDK](https://github.com/ContentSquare/capacitor-sample-app) [TypeScript](https://github.com/ContentSquare/capacitor-sample-app) ## Next steps While screen tracking gives an overview of user navigation, capturing session, screen, or user metadata provides a deeper understanding of the context behind user behavior. Our SDK offers a wide range of features to enhance your implementation, including Session Replay, Error Monitoring, extended tracking capabilities, and personal data masking. Proceed with these how-to's to refine your implementation. [Dynamic Variables](https://docs.contentsquare.com/en/capacitor/track-dynamic-variables/)Collect additional information about the session. [Transactions tracking](https://docs.contentsquare.com/en/capacitor/track-transactions/)Associate user's session with their potential purchases and corresponding revenue. [Session Replay](https://docs.contentsquare.com/en/capacitor/session-replay/)Collect data for Session Replay in compliance personal data masking. [Error Analysis](https://docs.contentsquare.com/en/capacitor/error-analysis/)Track API errors and application crashes with automated collection and privacy-safe debugging tools. ```json {"@context":"https://schema.org","@type":"TechArticle","headline":"Getting Started","description":"Integrate Contentsquare SDKs into your Capacitor apps in minutes (installation, user consent, screen tracking, and testing)","url":"https://docs.contentsquare.com/en/capacitor/","inLanguage":"en","dateModified":"2026-04-07T14:16:48+02:00","publisher":{"@type":"Organization","name":"Contentsquare","url":"https://www.contentsquare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://docs.contentsquare.com/#website","name":"Contentsquare Technical Documentation","url":"https://docs.contentsquare.com/"}} ``` --- title: What is Data Connect? - Data Connect description: Connect Contentsquare data with your warehouse or data lake for deeper business reporting, in-depth analysis, and customer modeling lastUpdated: 18 March 2026 source_url: html: https://docs.contentsquare.com/en/connect/ md: https://docs.contentsquare.com/en/connect/index.md --- > Documentation index: https://docs.contentsquare.com/llms.txt > Use this file to discover all available pages before exploring further. Data Connect is built for data teams. It automatically syncs Contentsquare behavioral data into your data warehouse, so you can run complex SQL-based analysis and combine it with other datasets in your organization (CRM, ERP, marketing tools, and more). Note Data Connect is available for [Enterprise and Pro (optional) ↗](https://contentsquare.com/pricing/) plans. ## Why use Data Connect? * **Combine various datasets.** Combine Contentsquare data with your existing datasets in one place, using the tools and query language your team already knows. * **Full SQL access.** Run complex analytical queries directly in your data warehouse on structured data. * **Feed your data pipelines.** Build downstream reporting, monitoring, and alerting workflows on top of Contentsquare data. * **Power ML and AI workflows.** Use Contentsquare's behavioral data to train ML models or enrich AI agents. * **Quick to set up.** Data Connect is self-serve and writes directly to your warehouse. No engineering work required to get started. ## How does it work? * Data Connect syncs data to your warehouse on a fixed schedule. Each sync is incremental, automatically appending fresh data in batches. * Data is organized using a structured [data schema](https://docs.contentsquare.com/en/connect/data-schema/), with each user interaction broken down into the following core tables: sessions, pageviews, and events. * Supported warehouses: [Amazon Redshift, Google BigQuery, Snowflake, Amazon S3, Databricks](https://docs.contentsquare.com/en/connect/data-warehouses-overview/). ```json {"@context":"https://schema.org","@type":"TechArticle","headline":"What is Data Connect?","description":"Connect Contentsquare data with your warehouse or data lake for deeper business reporting, in-depth analysis, and customer modeling","url":"https://docs.contentsquare.com/en/connect/","inLanguage":"en","dateModified":"2026-03-18T17:28:59+01:00","publisher":{"@type":"Organization","name":"Contentsquare","url":"https://www.contentsquare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://docs.contentsquare.com/#website","name":"Contentsquare Technical Documentation","url":"https://docs.contentsquare.com/"}} ``` --- title: Getting Started - Cordova description: Integrate Contentsquare SDKs into your Cordova apps in minutes (installation, user consent, screen tracking, and testing) lastUpdated: 07 April 2026 source_url: html: https://docs.contentsquare.com/en/cordova/ md: https://docs.contentsquare.com/en/cordova/index.md --- > Documentation index: https://docs.contentsquare.com/llms.txt > Use this file to discover all available pages before exploring further. Welcome to the SDK implementation guide! This guide is designed to help you seamlessly integrate our SDK into your application. By following the outlined steps, you'll be able to collect and analyze data from your app, within just a few minutes. ## Install the SDK The Contentsquare Plugin for Cordova is a plugin between the Contentsquare SDKs for iOS and Android, and your Cordova JavaScript code. It allows for the use of our solution both in native and JavaScript parts of your app. The Contentsquare functionality is provided through an NPM package including only the plugin and dependencies to specific versions of the SDKs. See [Compatibility](compatibility/) for more information. ### Include the SDK Install the plugin as follows, specifying the exact version you want to install if needed: ```shell cordova plugin add @contentsquare/cordova-plugin ``` If your app is written in TypeScript, you can also install the types definitions package. ```shell npm install -D @contentsquare/cordova-plugin-types ``` #### Use the plugin in your JavaScript code The plugin defines a `ContentsquarePlugin` object. Although the object is in the global scope, features provided by this plugin are not available until after the deviceready event. ```javascript document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { // ContentsquarePlugin is now available } ``` You do not need to do anything to start the SDK. Now that the SDK is a dependency of your app, it will autostart itself when your application starts. ### Validate SDK integration Start your application, and check logs for this output: * Android Studio ```text CSLIB: Contentsquare SDK 0.3 starting in app: com.example.testapp ``` * Xcode ```text CSLIB ℹ️ Info: Contentsquare SDK v0.3 starting in app: com.example.testapp ``` ## Check the logs Contentsquare provides logging capabilities that allow you to inspect the raw event data logged by your app in Android Studio, Xcode, or on the Contentsquare platform. To view all logs, you must [enable in-app features](#enable-in-app-features): logging is linked to in-app features being enabled or disabled. ### Viewing local logs in IDE * Android To view SDK logs: 1. Plug your Android phone into your computer (or use an emulator) 2. Open Android Studio and start your app 3. Open the `Logcat` view and select your phone or emulator 4. Filter logs by `CSLIB` ![](https://docs.contentsquare.com/_astro/logs-android.DcmHNl7a_1VAzm1.webp) * iOS 1. Unless you are using a simulator, ensure the device you are using is connected to your Mac or is on the same Wi-Fi network. 2. Open the macOS Console app or Xcode. For the macOS Console app, make sure info messages are included at [Choose Action > Include Info Messages ↗](https://support.apple.com/guide/console/customize-the-log-window-cnsl35710/mac). 3. Filter logs by `CSLIB`. ![](https://docs.contentsquare.com/_astro/logs-ios.BkLL-Bb7_Z1Ovm29.webp) ### Implement in app-features In-app features are essential for your implementation, as it includes key functionalities like screenshot creation and replay configuration. To allow Contentsquare users to enable in-app features, perform these tasks: 1. [Install the Cordova plugin to handle URL schemes](#1-install-the-cordova-plugin-to-handle-url-schemes) 2. [Call the SDK when your app is opened with the custom URL](#2-call-the-sdk-when-your-app-is-opened-with-the-custom-url) #### 1. Install the Cordova plugin to handle URL schemes In order for your application to open when you scan the QR code or enter the URL we provide in a web browser, you have to install a Cordova plugin which will handle the URL scheme. ```javascript cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=cs-{package-id} // Example: // my package id is 'com.mycompany.myapp' // cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=cs-com.mycompany.myapp ``` #### 2. Call the SDK when your app is opened with the custom URL Then, you will need to link your app with our SDK. When your application is started via a deeplink, a specific global JavaScript function, handleOpenURL(), is automatically called in your App. You will have to define this function in the 'window' global scope and you will need to call a function of our API via the Contentsquare Cordova Plugin. ```javascript window.handleOpenURL = function (url) { console.log("received url: " + url); ContentsquarePlugin.handleURL(url); }; ``` ### Enable in-app features To enable in-app features within your app, you have to **first make sure your app is launched in the background**. Then, follow the appropriate method described as follows. #### On a device: scan the QR code * Android In Contentsquare, select the Mobile icon in the menu top bar and scan the QR code with your phone. ![Scan the QR Code (Android)](https://docs.contentsquare.com/_astro/log-visualizer-access-qr.DnZz71r7_905Is.webp) * iOS In Contentsquare, select the Mobile icon in the menu top bar and scan the QR code with your phone. ![Scan the QR Code (iOS)](https://docs.contentsquare.com/_astro/log-visualizer-access-qr.BMM1NnUy_1kl8Dd.webp) #### On an emulator/simulator * Android In Contentsquare, select the Mobile icon in the menu top bar then select your app ID, and "Copy this ADB command". ![](https://docs.contentsquare.com/_astro/log-visualizer-access-adb.BaJqetXO_zt9bH.webp) * iOS If you have access to the Contentsquare platform, you can open the in-app features modal from the menu then select your app ID, and select "Copy this link". Paste it in Safari on your simulator to trigger the in-app features. ![](https://docs.contentsquare.com/_astro/log-visualizer-access-custom-link.BcDGrin1_1QRynb.webp) ### Contentsquare Log Visualizer Log Visualizer is a feature integrated into the Contentsquare SDK. As you navigate and interact with your app, it provides a live view of events detected by the SDK, visible directly on the [Contentsquare platform ↗](https://app.contentsquare.com/#/analyze/mobile-log). Prerequisite To use Log Visualizer, `Activate SDK logs stream` must be toggled on within in-app settings. 1. Start your app. 2. Select the Mobile icon in the menu top bar then select `Log Visualizer`. 3. Select the device to inspect. At this stage, you should see an 'App start' or 'App show' event being logged. * Android ![Log visualizer Android app start](https://docs.contentsquare.com/_astro/log-visualizer-app-start.CjWWxzSe_1CiJ7F.webp) * iOS ![Log visualizer iOS app start](https://docs.contentsquare.com/_astro/log-visualizer-app-start.BMUhGlzy_ZUr40e.webp) ## Get user consent Contentsquare collects usage data from your app users. To start tracking, you need your users' consent for being tracked. Warning You are responsible for handling the UI asking users for their consent and allowing them to manage their privacy settings. Consult our [Privacy Center ↗](https://contentsquare.com/privacy-center/) and [Privacy Policy ↗](https://contentsquare.com/privacy-center/privacy-policy/). ### User opt-in The SDK treats users as **opted-out by default.** To start tracking, use `optIn()`. The `optIn()` API enables tracking via Contentsquare by generating a user ID and initiating tracking. This method should be called after receiving consent from the user. For example, call `optIn()` when the user accepts your app's privacy policy or tracking terms: ```javascript import React, { useState } from "react"; import { View, Text, Button } from "react-native"; import Contentsquare from "@contentsquare/react-native-bridge"; const PolicyConsentScreen = () => { const [isTrackingAccepted, setIsTrackingAccepted] = useState(false); const handleAcceptPolicy = () => { setIsTrackingAccepted(true); Contentsquare.optIn(); // Opt-in for CS Tracking }; return ( Please accept our privacy policy to proceed.