@segmentik/sdk-client
TypeScript icon, indicating that this package has built-in type declarations

1.0.33 • Public • Published

Segmentik SDK for Javascript

This library can be implemented only in the frontend, it is not for server use. Make sure you have an API key before integrating:

  1. Register and login to the dashboard
  2. Navigate on the sidebar to "Integration"
  3. Copy the API Key

Getting started

npm i @segmentik/sdk-client

Usage:

import Segmentik from '@segmentik/sdk-client';

const sg = Segmentik.load({
	apiKey: 'API-KEY-HERE'
});
sg.then(session => session.detect())
  .then(data => console.log(data.detectionId, data.visitorId));

Alternatively, you can install from a CDN.

The SDK responds with detectionId and visitorId:

  • detectionId - An identifier used for querying in the backend to get the full detection details (bot detection, spoof detection etc.)
  • visitorId - A unique and persistent identifier for the user

Requirements

  • Node.js > 14

Package Sidebar

Install

npm i @segmentik/sdk-client

Weekly Downloads

1

Version

1.0.33

License

ISC

Unpacked Size

14.1 kB

Total Files

8

Last publish

Collaborators

  • evyros