スタートガイド
このプラグインのインストール手順とフル マークダウン ガイドを含むセットアップの質問をコピーできます。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-contentsquare`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/contentsquare/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」のセクションAI-Assisted Setupを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください。
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-contentsquare` plugin in my project.Manual Setupを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
-
プラグインのインストール
ターミナル画面 npm i @capgo/capacitor-contentsquareターミナル画面 pnpm add @capgo/capacitor-contentsquareターミナル画面 yarn add @capgo/capacitor-contentsquareターミナル画面 bun add @capgo/capacitor-contentsquare -
ネイティブプラットフォームを同期
ターミナル画面 npx cap syncターミナル画面 pnpm cap syncターミナル画面 yarn cap syncターミナル画面 bunx cap sync -
アップストリーム製品の設定を確認してください
公式の Contentsquare Capacitor ガイド プロジェクトキー、再生設定、ダッシュボード設定のためのガイド
基本的な使用方法
「基本的な使用方法」のセクションimport { ContentsquarePlugin, CurrencyCode } from '@capgo/capacitor-contentsquare';
await ContentsquarePlugin.optIn();
await ContentsquarePlugin.sendScreenName('Home');
await ContentsquarePlugin.sendTransaction({ transactionValue: 29.99, transactionCurrency: CurrencyCode.EUR, transactionId: 'order-123',});
await ContentsquarePlugin.sendDynamicVar({ dynVarKey: 'store', dynVarValue: 'rome',});画面の命名に関するヒント
「画面の命名に関するヒント」のセクション- ユーザー固有の値ではなく、安定した名前を使用すること。
- iOSとAndroidのナビゲーションスタックで同じ命名規則を使用すること。
- アプリが前景に戻ったときに、画面名と重要な動的変数を再送信すること。
再生のプライバシー制御
「再生のプライバシー制御」のセクションセッション再生から敏感なコンテンツを除外するには、組み込みのマスクヘルパーを使用してください:
await ContentsquarePlugin.excludeURLForReplay('/checkout/');
await ContentsquarePlugin.setCapturedElementsSelector('[data-cs-capture]');
await ContentsquarePlugin.setPIISelectors({ PIISelectors: ['input[type="email"]', '.credit-card'], Attributes: [{ selector: 'input[name="email"]', attrName: 'value' }],});プラットフォームの設定
プラットフォームの設定- iOSのインアプリ機能の場合、追加のデープリンクのワイヤリングをページの iOSの設定 ページに完了してください。
- Androidにはプラグイン自体のための追加のマニフェストのワイヤリングが必要ありません。ログと検証のヒントについては Androidの注記 を参照してください。
注記
注記- This plugin is a Capacitor 8 community port of the official Contentsquare Capacitor package.
- The JavaScript API stays aligned with the current Contentsquare Capacitor docs, while the packaging and native build setup target Capacitor 8.
続けてください:始め方
「続けてください:始め方」このプラグインを使用している場合 始め方 Nativeプラグインの作業を計画するには、__CAPGO_KEEP_0__を接続してください。 Using @capgo/capacitor-contentsquare Using @capgo/capacitor-contentsquareのNative機能 Capgo プラグインディレクトリ Capgo プラグインディレクトリの製品ワークフロー Capacitor Plugins by Capgo Capgoプラグインの実装詳細についてはCapacitorプラグインによってCapgo プラグインの追加または更新 Capgoプラグインの実装詳細についてはプラグインの追加または更新、 Ionic Enterpriseプラグインの代替 Ionic EnterpriseプラグインのワークフローについてはIonic Enterpriseプラグインの代替