Skip to content

Android Notes

GitHub

Android does not require extra host-app setup for the plugin itself. Once installed and synced, the plugin registers the main Capacitor WebView, injects the Contentsquare event bridge, and exposes the documented JavaScript APIs.

  • Registers the Capacitor WebView with the native Contentsquare SDK.
  • Exposes optIn, optOut, sendScreenName, sendTransaction, and dynamic variable APIs.
  • Injects replay-related commands such as URL exclusion, PII masking, and captured element selectors.

Filter Android Studio Logcat with:

CSLIB

You should see the native Contentsquare SDK startup message and the WebView bridge registration during app launch.

import { ContentsquarePlugin } from '@capgo/capacitor-contentsquare';
await ContentsquarePlugin.optIn();
await ContentsquarePlugin.sendScreenName('Home');

Without at least one screenview, the session is not kept by Contentsquare.

  • Keys are limited by Contentsquare to 512 characters.
  • Values must be either a string or a non-negative integer.
  • If you want a value on every session, send it again when the app returns to foreground.

If you are using Android Notes to plan native plugin work, connect it with Using @capgo/capacitor-contentsquare for the native capability in Using @capgo/capacitor-contentsquare, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives.