Was this page helpful?

Custom event destinations

Overview

Ninetailed provides several plugins that allow you to send Ninetailed Experience impression events to downstream systems. Reporting on Experiences in analytics systems you adopt is an excellent supplement to Ninetailed Experience Insights.

Google Tag Manager is a popular tool for routing client-side events to your destinations of interest using tags. This guide covers setting up variables, triggers, and tags to receive Ninetailed component impression events.

NOTE: You'll want to have already installed the Google Tag Manager plugin before using this guide. This step is not required to run Ninetailed Insights. It is an option to send Ninetailed impression events to your own analytics systems.

Set up Google Tag Manager

NOTE: This guide assumes that you are already familiar with Google Tag Manager (GTM) and have set up a container in your front-end. For more information, see the GTM documentation.

To track personalized components or measure experiment results, Google Tag Manager (GTM) requires some data from the data layer. Your triggers can then be set up through the values contained in the data layer.

Step 1: Set up Ninetailed Variables

Variables help you send certain information about the Experience that was seen forward via Google Tag Manager.

To set up variables for your website:

  1. Go to the "Variables" section in your Google Tag Manager and create a new User-Defined variable.
  2. Give your variable a name (according to your variable base on the next steps).
  3. Select a variable type. Your variable type should be the data layer.
  4. After choosing a variable type, you need to enter a name for the data layer variable field.
  5. Save your variable.

Step 2: Create a Ninetailed event trigger

A trigger can be fired every time an Experience was seen.

To set up a trigger for your content:

  1. Go to the "Triggers" section in your Google Tag Manager and create a new trigger.
  2. Enter a name. You can call it "Ninetailed Experience" or "has seen Ninetailed Experience".
  3. Select a trigger type, and choose Custom event.
  4. Use nt_experience as the event name value.
  5. Click Save to save your trigger.

Step 3: Set up a tag to forward your Ninetailed experience trigger

To create a tag:

  1. Go to the "Tags" section in your Google Tag Manager and create a new Tag.
  2. Choose your tag type depending on where you want to send your data. For example, if you would like to forward data to Google Analytics, choose "Google Analytics: GA4 Event".
  3. Enter an event name and event parameters. Here, you can now use the variables that you have set up before.
  4. As a trigger, use the Ninetailed event trigger that you have set up before.
  5. Save your tag.
NOTE: Ensure that the destinations configured within your tags can receive and report on the data being sent with each `nt_experience` event. For example, Google Analytics 4 requires that you define custom dimensions before you can receive them.

Repeat step 3 several times if you would like to forward these events to more destinations.

Preview website

You can now preview your website using Google Tag Manager's Preview Mode to see that events are triggered correctly. The trigger and tag that you have set up should now fire every time the user sees an Experience.