Ninetailed
Search…
⌃K

Getting Started

This guide describes the steps you need to follow to add Ninetailed to React JS.
With the React SDK, you can add dynamic content for personalization to any component.

Install React SDK

Install the @ninetailed/experience.js-react module via npm or yarn.

Install module via npm

npm install @ninetailed/experience.js-react

Install module via yarn

yarn add @ninetailed/experience.js-react

How to Use

This is what the configuration of @ninetailed/experience.js-react looks like:
import React from 'react';
import {
NinetailedProvider
} from '@ninetailed/experience.js-react';
export const App = () => {
return (<>
<NinetailedProvider
/* required */
clientId="Your_API_Key"
/* The environment defaults to main - set this if you want to use another */
environment="main"
/* If the preview is enabled Draft Audiences will be applied to the profile */
preview={false}
/* Sets needed plugins */
plugins=[]
/* Translate Location names to the set locale - useful for Mergetags */
locale="en-US"
/* The maximum loading time until the fallback (Baseline) will be shown */
requestTimeout={500}
/* The profile can be set, when you got that information from SSR or ESR */
profile={profileFormSSR}
>
<YourAppCode />
</AnalyticsProvider>
</>);
}
Your API Key can be found in the Ninetailed dashboard.