Ninetailed
Search…
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-sdk-react module via npm or yarn.

Install module via npm

1
npm install @ninetailed/experience-sdk-react
Copied!

Install module via yarn

1
yarn add @ninetailed/experience-sdk-react
Copied!

How to use

This is what the configuration of @ninetailed/experience-sdk-react looks like:
1
import React from 'react';
2
import {
3
ProfileProvider,
4
AnalyticsProvider,
5
} from '@ninetailed/experience-sdk-react';
6
7
export const App = () => {
8
return (<>
9
<ProfileProvider>
10
<AnalyticsProvider apiKey="Your_API_Key">
11
<YourAppCode />
12
</AnalyticsProvider>
13
</ProfileProvider>
14
</>);
15
}
Copied!
Your API Key can be found in the CMS or Ninetailed dashboard configuration.
Contentful app configuration screen
Next you need to set the ProfileProvider and AnalyticsProvider. We recommend to simply wrap your app component with both providers.
Last modified 2mo ago