Skip to content

Getting Started

GitHub

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

  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のナビゲーションスタックで同じ命名規則を維持します。
  • アプリが前景に戻ったときに、スクリーン名と重要なダイナミック変数を再送信します。

プライバシー制御の再生

プライバシー制御の再生

セッション再生から敏感なコンテンツを除外するために、組み込みのマスクヘルパーを使用します:

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 プラグインの代替の製品ワークフロー 編集