コンテンツにスキップ

Getting Started

GitHub

AI アシスト セットアップを使用してプラグインをインストールできます。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を使用する場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム固有の指示に従ってください:

  1. プラグインのインストール

    ターミナルウィンドウ
    npm i @capgo/capacitor-contentsquare
  2. ネイティブプラットフォームの同期

    ターミナル画面
    npx cap sync
  3. アップストリーム製品の設定を確認する

基本的な使用方法

基本的な使用方法
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 のナビゲーション スタックで同じ命名規則を使用します。
  • アプリが前景に戻ると、画面名と重要なダイナミック変数を再送信します。

__CAPGO_KEEP_0__

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' }],
});

__CAPGO_KEEP_0__

Platform setup
  • iOSアプリ内機能のための追加のデープリンクのワイヤリングは、 iOS設定 ページで完了してください。
  • Androidでは、このプラグイン自体のための追加のマニフェストのワイヤリングは必要ありません。 Androidのノート でログインと検証のためのヒントを参照してください。
  • JavaScriptのCapacitorは、現在のContentsquareCapacitorドキュメントと同期されています。
  • The JavaScript API stays aligned with the current Contentsquare Capacitor docs, while the packaging and native build setup target Capacitor 8.

Getting Startedから続けてください

「Getting Started」から続けてください

あなたが「を使用している場合 Getting Started ネイティブ プラグインの作業を計画するには、を接続してください 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, プラグインの実装の です プラグインの実装の です Capacitor Enterprise プラグイン代替 __CAPGO_KEEP_0__のためのCapacitor Enterprise プラグイン代替。