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-sdk-nextjs module via npm or yarn.

Install module via npm

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

Install module via yarn

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

How to use

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