Getting Started
This guide describes the steps you need to follow to add Ninetailed to Gatsby.
With the Gatsby JS plugin, you can add dynamic content for personalization to any component.
Install the
gatsby-plugin-ninetailed
modules via npm or yarn.npm install @ninetailed/gatsby-plugin-ninetailed @ninetailed/experience-sdk-react
yarn add @ninetailed/gatsby-plugin-ninetailed @ninetailed/experienceexperience-sdk-react
If you use Gatsby JS and Contentful as CMS install the
gatsby-plugin-ninetailed
and contentful-plugin-ninetailed
modules via npm or yarn.npm install @ninetailed/gatsby-plugin-ninetailed @ninetailed/experience-sdk-react @ninetailed/experience-sdk-gatsby-contentful
yarn add @ninetailed/gatsby-plugin-ninetailed @ninetailed/experience-sdk-react @ninetailed/experience-sdk-gatsby-contentful
Just add the plugin to the plugins array in your
gatsby-config.js
and your API Key.plugins: [
...your other gatsby plugins
{
resolve: `gatsby-plugin-ninetailed`,
options: {
apiKey: 'your api key'
}
}
]
By using the Gatsby JS plugin there's no need to configure the
ProfileProvider
or AnalyticsProvider
as described in the React tutorial, as this is done by the plugin.The plugin automatically tracks Pageviews on route change, please do not track it on your own as you would generate incorrect events.
Last modified 8mo ago