ガイド
Intercomのチュートリアル
capgo/capacitor-intercomを使用する
CapacitorのIntercomプラグイン
インストール
bun add @capgo/capacitor-intercom
bunx cap sync
このプラグインが公開するもの
loadWithKeys- APIキーを使用してIntercomを実行時で初期化します。capacitor.configでキーを設定しない場合はこちらを使用してください。registerIdentifiedUser- Intercomに既知のユーザーを登録します。ユーザー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);
フル リファレンス
- GitHub: https://github.com/Cap-go/capacitor-intercom/
- ドキュメント: /docs/plugins/intercom/