Ninetailed
Search…
Getting Started
This guide describes the steps you need to follow to add Ninetailed to Next.js.
With the Next.js SDK, you can add dynamic content for personalization to any component.

Install Next.js SDK

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

Install module via npm

1
npm install @ninetailed/experience.js-next
Copied!

Install module via yarn

1
yarn add @ninetailed/experience.js-next
Copied!

How to Use

This is what the basic configuration of @ninetailed/experience.js-next looks like:
1
import React from 'react';
2
import { AppProps } from 'next/app';
3
import {
4
NinetailedProvider
5
} from '@ninetailed/experience.js-next';
6
7
export const App: React.FC<AppProps> = ({ Component, pageProps }) => {
8
return (
9
<NinetailedProvider clientId="YOUR_API_KEY">
10
<Component {...pageProps} />
11
</NinetailedProvider>
12
);
13
}
Copied!
The <NinetailedProvider /> supports the same properties as the one exported by the @ninetailed/experience.js-react SDK. You can find the documentation in the React section.