メイン コンテンツにスキップ
プラグインに戻る
@capgo/capacitor-intercom
チュートリアル
@capgo/capacitor-intercom

Intercom

Capacitor アプリに Intercom ライブ チャット、ヘルプ センター、サポート ワークフローを統合する

ガイド

Intercomのチュートリアル

Using @capgo/capacitor-intercom

Intercom Capacitor プラグイン

インストール

bun add @capgo/capacitor-intercom
bunx cap sync

このプラグインが公開するもの

  • loadWithKeys - API キーを使用して、capacitorで実行時にIntercomを初期化します。capacitor.configにキーを設定しない場合はこちらを使用してください。
  • registerIdentifiedUser - __CAPGO_KEEP_0__で既知のユーザーを登録します。ユーザーIDまたはメールアドレスのいずれかを提供する必要があります。
  • registerUnidentifiedUser - Intercom に匿名ユーザーを登録します。
  • updateUser - Intercom のユーザー属性を更新します。

例の使用

loadWithKeys

API キーを実行時に初期化します。 capacitor.config にキーコンフィグを設定しない場合は使用してください。

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.loadWithKeys({} as IntercomLoadOptions);

registerIdentifiedUser

Intercom に既知のユーザーを登録します。少なくとも userId または email の 1 つが必要です。

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.registerIdentifiedUser({} as IntercomIdentifiedUserOptions);

registerUnidentifiedUser

- Intercom に匿名ユーザーを登録します。

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.registerUnidentifiedUser();

updateUser

- Intercom のユーザー属性を更新します。

import { CapgoIntercom } from '@capgo/capacitor-intercom';

await CapgoIntercom.updateUser({} as IntercomUserUpdateOptions);

フル リファレンス

Using @capgo/capacitor-intercom から続けてください。

あなたが @capgo/capacitor-intercom を使用している場合 @capgo/capacitor-intercom for the implementation detail in @capgo/capacitor-intercom, @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intercom の実装詳細については @Capgo/__CAPGO_KEEP_1__-intercom for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Getting Started 実装詳細についての追加または更新の際の詳細を参照してください。