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={[
new 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 |
ninetailed_variant | String | required | control, variant 1, variant 2, … |
ninetailed_audience | String | optional | id |
ninetailed_component | String | optional | id |
others | | | |
Last modified 4d ago