Getting Started
インストール手順とこのプラグインのフルマークダウンガイドを含むセットアッププロンプトをコピーしてください。
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.
インストール
「インストール」のセクションCapgo の AI-Assisted セットアップを使用してプラグインをインストールできます。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 セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
-
プラグインをインストール
ターミナル画面 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.
- JavaScriptのAPIは現在のContentsquareCapacitorドキュメントと同期され、パッケージングとネイティブビルド設定はCapacitor 8をターゲットにします。
始めから続ける
「始めから続ける」というタイトルのセクションCapacitorを使用している場合 Capacitorを使用してNativeプラグインの作業を計画する場合、__CAPGO_KEEP_0__と__CAPGO_KEEP_1__を接続します。 Capacitorを使用してNativeプラグインの作業を計画する場合、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-contentsquareを使用します。 Using @capgo/capacitor-contentsquare native機能の使用に@capgo/capacitor-contentsquareを使用する Capgo プラグインディレクトリ Capgo プラグインの__CAPGO_KEEP_1__ native機能の実装詳細についてはCapacitor プラグインのCapgo for the implementation detail in Capacitor Plugins by Capgo, native機能の実装詳細についてはプラグインの追加または更新 Ionic Enterprise プラグインの代替 Ionic Enterprise プラグインの代替の製品ワークフロー 編集