@clicknest/sdk
v0.1.1
Published
ClickNest analytics SDK with autocapture
Downloads
29
Readme
@clicknest/sdk
The official JavaScript SDK for ClickNest — self-hosted, AI-native web analytics.
Installation
npm install @clicknest/sdkOr via script tag:
<script src="https://your-clicknest-host/sdk.js"
data-api-key="cn_your_api_key"
data-host="https://your-clicknest-host">
</script>Usage
import ClickNest from '@clicknest/sdk';
ClickNest.init({
apiKey: 'cn_your_api_key',
host: 'https://your-clicknest-host',
});
// Identify a user
ClickNest.identify('user-123', { email: '[email protected]' });
// Track a custom event
ClickNest.track('Signed up');
// Feature flags
const enabled = ClickNest.isEnabled('my-feature');Pageviews and clicks are captured automatically — no manual instrumentation needed.
Self-hosting
See the ClickNest README for deployment instructions.
