Get started

Capacitor support is currently only accessible to customers participating in the Beta program. For more information reach out to your Contentsquare contact.

This guide walks you through the process of adding the Contentsquare SDKs to your Capacitor application. The Contentsquare Plugin for Capacitor is a plugin between the Contentsquare SDKs for iOS and Android, and your Capacitor 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. Check the compatibility section for more information about these dependencies, and the minimum Capacitor version compatible for each version of the Plugin.

Open up a terminal window and navigate to the folder where your application is stored. First, find the latest version of the plugin compatible with your version of Capacitor using our compatibility table. Then, install the plugin as follows, specifying the exact version you want to install if needed:

Terminal window
npm install @contentsquare/capacitor-plugin
npx cap sync

How to use the plugin in your JavaScript code

Section titled How to use the plugin in your JavaScript code

The plugin defines a ContentsquarePlugin object.

import { ContentsquarePlugin } from '@contentsquare/capacitor-plugin';

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.

Look at the native SDK docs for validation on each platform.

📚 Validate Android SDK integration
📚 Validate iOS SDK integration