Getting Started
All Ninetailed Web-SDKs use the
@ninetailed/experience.js
SDK internally.If you are using a Web Framework, which is not supported yet you can always fall back to the
@ninetailed/experience.js
library. When working with the React, Gatsby, and Next.js Ninetailed SDKs, you do not need to manually make a
new Ninetailed
instance as in the code example below. Installing those SDKs automatically create the Ninetailed
instance and make it available globally within the application.import { Ninetailed } from '@ninetailed/experience.js';
const ninetailed = new Ninetailed(
{
// Your Ninetailed API Key - required
clientId: "...",
// Set this if you want to use another env as main. Defaults to main.
environment: "main",
// Defaults to false - set if you want to see Draft Audiences.
preview: false
},
{
// Use the Ninetailed Plugin system, e.g. privacy, preview Widget etc.
plugins: [],
// Passes a profile for SSR
profile: undefined,
// Translates Ninetailed provided Data like location into given locale
locale: "en-Us",
// The maximum loading time until the fallback (Baseline) will be shown
requestTimeout: 500
}
);
// send a pageview
ninetailed.page();
// send a track event
ninetailed.track();
// send a identify event
ninetailed.identify('userId', { firstname: "Louis" })
The
@ninetailed/experience.js
the library handles all communication between the Ninetailed Experience API & the browser for you. It makes very short integration times into any codebase possible.- Creating
Pageview
Track
&Identify
Events and send them to Ninetailed API - Taking care of Errors, Retries & Queuing
- Handling Client-Side Cache
Last modified 1mo ago