by duicorn | v0.2.2
NativeScript plugin for the open source product analytics software Posthog
npm i --save @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


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: ''});


Apache License Version 2.0