Ninetailed
Search…
Installation
This section describes how to install the Ninetailed GTM plugin to send experience events

To set up Ninetailed to send events to Google Tag Manager, you need to install the @ninetailed/experience.js-plugin-google-tagmanager package.
npm
yarn
npm install @ninetailed/experience.js-plugin-google-tagmanager
yarn add @ninetailed/experience.js-plugin-google-tagmanager

Import the Ninetailed Google Tag Manager using the code below:
import { NinetailedGoogleTagmanagerPlugin } from '@ninetailed/experience.js-plugin-google-tagmanager';
Use the following code in your codebase:
<NinetailedProvider
// ...
plugins={[
NinetailedGoogleTagmanagerPlugin()
]}
>
//... Your Application Components
</NinetailedProvider>
Events sent from the Ninetailed SDK to the data layer have five variables but only three (3) are needed to setup the tag.
The table below describes the properties:

Fields
Type
Priority
Description
Event
String
required
nt_experience
ninetailed_experience
String
required
id or name
ninetailed_variant
String
required
control, variant 1, variant 2, …
ninetailed_audience
String
optional
id or name
ninetailed_component
String
optional
id or name
others
Using names for your variable values might cause conflicts if not carefully updated. Therefore we recommend using Id(s).
Copy link
On this page
Install the GTM Plugin
How To Use
GTM Variables