Richtlinie
Tutorial zu AppInsights
Mit @capgo/capacitor-appinsights
Ein Wrapper um den https://github.com/apptopia/appinsights SDK.
Installieren
bun add @capgo/capacitor-appinsights
bunx cap sync
Was diese Erweiterung bereitstellt
init- Die AppInsights SDK initialisierensetUserId- Die Benutzer-ID nach der Initialisierung setzen oder aktualisierengetState- Den aktuellen Zustand der SDK abrufen
Beispielhafte Verwendung
init
Die AppInsights SDK initialisieren
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
Die Benutzer-ID nach der Initialisierung setzen oder aktualisieren
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.setUserId({} as { userId: string });
getState
Den aktuellen Zustand der SDK abrufen
import { CapacitorAppInsights } from '@capgo/capacitor-appinsights';
await CapacitorAppInsights.getState();
Vollständige Referenz
- GitHub: https://github.com/Cap-go/capacitor-appinsights/
- Dokumentation: /docs/plugins/appinsights/
Fortsetzen Sie mit der Verwendung von @capgo/capacitor-appinsights
Wenn Sie native Plugin-Arbeiten planen, verbinden Sie es mit @capgo/capacitor-appinsights um die Implementierungsdetails in @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-appinsights zu erhalten @capgo/capacitor-appinsights for the implementation detail in @capgo/capacitor-appinsights, __CAPGO_KEEP_0__-Plugin-Verzeichnis um den Produktworkflow in __CAPGO_KEEP_0__-Plugin-Verzeichnis zu erhalten Capgo Plugin Directory Using @Capgo/__CAPGO_KEEP_1__-appinsights Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, and Plugins hinzufügen oder aktualisieren für die Implementierungsdetails in Plugins hinzufügen oder aktualisieren.