メインコンテンツにスキップ
プラグインに戻る
@capgo/capacitor-appinsights
チュートリアル
github.com/Cap-go によって

AppInsights

Apptopia AppInsights を使用してアプリの使用状況、パフォーマンス メトリック、ユーザー ビヘイビアを追跡できます。

ガイド

アプリインサイトのチュートリアル

@capgo/capacitor-appinsights を使用

アプリインサイトのラッパー https://github.com/apptopia/appinsights SDK

インストール

bun add @capgo/capacitor-appinsights
bunx cap sync

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

  • init - アプリインサイトの SDK を初期化する
  • setUserId - 初期化後、ユーザーIDを設定または更新します。
  • getState - SDKの現在の状態を取得します。

例の使用

init

SDKのAppInsightsを初期化します。

import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';

await CapacitorAppInsights.init({} as {
    partnerId: string; // Provided by our business unit
    partnerKey: string; // Provided by our business unit
  });

setUserId

初期化後、ユーザーIDを設定または更新します。

import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';

await CapacitorAppInsights.setUserId({} as { userId: string });

getState

- SDKの現在の状態を取得します。

import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';

await CapacitorAppInsights.getState();

フルリファレンス