0.2.2 • Published 9 months ago
@duicorn/nativescript-posthog v0.2.2
@duicorn/nativescript-posthog
NativeScript plugin for PostHog product analytics. Not all configuration options are implemented yet, but basic event capturing and feature flags are supported.
ns plugin add @duicorn/nativescript-posthog
Usage
import Posthog from '@duicorn/nativescript-posthog';
// initialize with you posthog key
Posthog.setup('<api_key>', {
host: 'https://app.posthog.com',
recordScreenViews: true,
captureApplicationLifecycleEvents: true,
});
// capture an event
Posthog.capture('app event');
// identify the user
Posthog.identify('uniqueID', {email: ''});
License
Apache License Version 2.0