Android Notes
此内容尚不支持你的语言。
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.
What the plugin does on Android
Section titled “What the plugin does on Android”- Registers the Capacitor
WebViewwith 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.
Validation tips
Section titled “Validation tips”Check native logs
Section titled “Check native logs”Filter Android Studio Logcat with:
CSLIBYou should see the native Contentsquare SDK startup message and the WebView bridge registration during app launch.
Track a first session
Section titled “Track a first session”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.
Dynamic variable constraints
Section titled “Dynamic variable constraints”- 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.