Ninetailed
Search…
Getting Started
This guide is for developers, to help integrate the preview SDK.
There is so much to take into account before products can go live. Most times you want to be sure that the experience you serve to your customers is authentic and performs on delivery as expected.
To be sure that audiences receive the right content, the preview widget is developed to give you the power to preview content behaviour based on audience traits in your development environment before it is pushed live or to production.

Installation

To preview personalized content, install the @ninetailed/experience.js-plugin-preview
npm
yarn
//Install via npm
npm install @ninetailed/experience.js-plugin-preview
//Install via yarn
yarn add @ninetailed/experience.js-plugin-preview

How to Use

This feature is only meant for editors and as such, we only recommend using it in development or staging environments. By using this feature, you're able to take advantage of the following benefits:
  • Preview your changes before publishing them
  • Revert back to a previous version of your content if needed
To use the Preview Widget, import the plugin like so:
import preview from @ninetailed/experience.js-plugin-preview
Add the following code snippet to your codebase. To get your unique ID, you can check here
<NinetailedProvider
plugins={[
NinetailedPreviewPlugin({
clientId: PUBLIC_NINETAILED_MANAGEMENT_CLIENT_ID ?? "",
secret: PUBLIC_NINETAILED_MANAGEMENT_SECRET ?? "",
environment: PUBLIC_NINETAILED_ENVIRONMENT ?? "main",
ui: { opener: { hide: false } },
}),
]}
clientId={PUBLIC_NINETAILED_CLIENT_ID ?? ""}
environment={PUBLIC_NINETAILED_ENVIRONMENT ?? "main"}
>
<Component {...pageProps} />
</NinetailedProvider>;
After inputting the required ID, the Ninetailed SDK handles the rest for you.
Note: The Preview Widget works independently from your CMS preview feature.
Copy link
On this page
Installation
How to Use