Custom Event Destinations
Configuring tags and triggers in Google Tag Manager to receive Ninetailed Experience impression events.
Ninetailed provides several plugins that allows 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. 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.
Setting Up Google Tag Manager
This guide assumes that you are already familiar with GTM and have set up a container in your frontend. For more info, check out 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 setup variables for your website, use the following steps:
Go to the "Variables" section in your Google Tag Manager and create a new User-Defined variable
Give your variable a name (according to your variable base on the next steps)
Select a variable type. Your variable type should be the
data layer
After choosing a variable type, you need to enter a name for the data layer variable field. See our developer section to find out what data layer properties are available
Save your variable by clicking the save button
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, use the following steps:
Go to the "Triggers" section in your Google Tag Manager and create a new trigger
You can call it "Ninetailed Experience" or "has seen Ninetailed Experience"
Select a trigger type. Choose "custom event"
Use
nt_experience
as the event name valueSave your trigger by clicking the save button
Step 3: Setup a Tag to Forward Your Ninetailed Experience Trigger
To create a tag, follow the steps below:
Go to the "Tags" section in your Google Tag Manager and create a new Tag
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"
Enter an event name and event parameters. Here, you can now use the variables that you have set up before
As a trigger, use the Ninetailed event trigger that you have set up before
Save your Tag by clicking the save button
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.
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.
Last updated