コンテンツにジャンプ

はじめに

GitHub

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. アップストリーム製品の設定を確認してください

    • 公式のドキュメントを参照してください 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.

続けて始めましょう

「続けて始めましょう」

あなたが使用している場合 Getting Started Getting Startedを使用してネイティブプラグインの作業を計画する場合、接続するには Using @capgo/capacitor-contentsquare Using @capgo/capacitor-contentsquareの「@capgo/capacitor-contentsquare」 Capgo プラグインディレクトリ Capgo プラグインディレクトリの「Capgo プラグインディレクトリ」 Capacitor Plugins by Capgo Capgoプラグインの実装詳細については、CapacitorプラグインによってCapgo プラグインの追加または更新 Capgoプラグインの実装詳細については、プラグインの追加または更新、 Ionic Enterpriseプラグインの代替 Capgoプラグインの製品ワークフローについては、Ionic Enterpriseプラグインの代替