> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Changelog

> The changelog of the previous Ninetailed releases.

## Version 7

### Major Changes

* Introduces using the Experience API's returned experience data to select the appropriate experience and variant when using the Shared or JS SDK.
  * This change significantly streamlines architectures other outside of web client-side-rendered React by allowing you to rely on the Experience API's response and declarative methods to select the Experience variants to render, rather than having to determine this yourself by replicating our React SDK code
  * The React, Next.js and Gatsby SDKs default to using the API response to select the correct experience and variant. To ensure compatibility with content sources that do not yet have Ninetailed Experiences IDs served over the Experience API, you should leverage the `useSDKEvaluation` property on the Ninetailed instance
* Support for React Native through:
  * Removing incompatible polyfills (also a 33% reduction in package size)
  * Ability to pass a custom storage and request context implementation on React and JavaScript SDKs
* **\[BREAKING]**: `profile` is no longer a property of `Ninetailed` class instances or `<NinetailedProvider>` components.

### Minor Changes

**7.9**

* Fixes an issue where the Preview Plugin such that it can only be rendered once, preventing potential performance degradation from multiple rendered instances
* Insights API requests error related to timeouts are now appropriately caught
* Reactors how events are constructed internally by the SDK

**7.8**

* Uses the Experience API, rather than fetched content, to determine if an experiment is sticky
* 7.8.1
  * Fixes a non-urgent, uncaught exception within a low-level library

**7.7**

* Adds a second configuration parameter to the Privacy Plugin to indicate what events and behaviours should be permissible even after end-user consent is provided. Previously, the Privacy Plugin enabled all events and behaviours after consent.
* Adds a new `mapCustomExperienceAsync` method to the Contentful Utils library that supports asynchronous operations in the variant mapping function.
* 7.7.4
  * Reverts event-sending functions attached to `window.ninetailed` to non-`async` functions, providing better compatibility with third party analytics containers
* 7.7.3
  * Fixes a bug with several JS Utils `ExperienceMapper` methods that would not default the variants array to an empty array
* 7.7.2
  * Fixes a race condition in the Privacy Plugin
* 7.7.1
  * Resolves an issue related to correctly propagating the installed version of the Preview Plugin

**7.6**

* Adds the `useSDKEvaluation` to toggle how Experience variant selection is controlled. Variant selection using experience data from Experience API responses has been moved to the JavaScript SDK from the React SDK. Additionally, API-driven experience and variant selection replaces SDK-driven selection as the default.
  * Implementations using content sources that whose Experiences and Audiences are not indexed by the Experience API will need to designate `useSDKEvaluation: true` in the Ninetailed instance configuration options until their experience data are served over the Experience API. Nearly all Ninetailed users should leave this option unspecified to use the default of  `useSDKEvaluation: false`
* Adds `onSelectVariant`  to the Ninetailed instance. This is a significant improvement to developer experience for implementing Ninetailed in non-React builds and ESR/SSR runtimes. Additionally, the React SDK has been updated to use this method internally.
* Adds the `onRouteChange` configuration option to the Next.js and Gatsby SDKs, allowing for declarative customization of Ninetailed route change events called within these frameworks
* Adds the `batch` method to the Ninetailed instance
* Adds the `EventBuilder` class and `eventBuilder` class instance to the Ninetailed instance
* 7.6.1
  * Upgrades a dependency to mitigate a Regex security issue flagged by a third party

#### 7.5

* Adds a new `onInitProfileId` configuration option for Ninetailed instances.
* 7.5.3
  * Fixed plugins not sending impression events for empty variants
* 7.5.2
  * Typing for `Ninetailed` instance corrected
  * Preview Plugin uses an `ExposedAudienceDefinition` type for the `audiences` parameter
* 7.5.1
  * `<MergeTag>` components now accept a fallback property

#### 7.4

* Adds a `timeout` option to all Node.js SDK requests

#### 7.3

* Adds a `getProfile` method to instances of `NinetailedApiClient`. This allows SDKs built on top of our shared SDK, like the [Node.js SDK](/personalization/node-sdk), to get profiles without having to send `track` or `identify` events

#### 7.2

* Adds the `component` event option to `allowedEvents` of the [Privacy Plugin](/personalization/privacy-plugin)

## Version 6

Version 6.0 supports our new Insights capabilities.

### Major Changes

* **\[BREAKING]**: By default, an element must be present within the viewport for 2 seconds before any connected Ninetailed tracking plugins will fire. Previously, plugins would fire events as soon as an element entered the viewport. The timing is customizable using a new `componentTrackingViewThreshold` property available on the `NinetailedProvider` that accepts a value in milliseconds. Use a value of `0` to emulate the old behavior.
* **\[BREAKING]**: The internal mechanism by which plugins fire off tracking events is now agnostic to your choice of JavaScript UI library (previously, this logic was React-specific). All plugins and SDKs should be on the same major version to ensure compatibility.
* **\[BREAKING]**: The `useExperience` hook returns `variant` as either the variant or baseline to render. Previously, this hook would return `variant: null` if the baseline was selected.
* **\[BREAKING]**: Renames `ninetailed.trackHasSeenExperience` to `ninetailed.trackComponentView` to indicate that this can function as a tracker of both Ninetailed Experience and non-Ninetailed Experience content. In the latter case, supplying the experience ID and variant index are optional.

### Minor changes

#### 6.4

* Adds an `onOpenAudienceEditor` callback function to the [Preview Plugin](/personalization/preview-plugin).
* Removes unused `@analytics/google-analytics` dependency.

#### 6.3

* The `experiments` and `maximumActiveExperiments` prop on the `NinetailedProvider` are deprecated.
* Profiles are no longer assigned `nt_experiment_` traits to indicate their participation in experiments.
* Profiles are assigned a `stableId` property that persists through aliasing `identify` events.