How To Use
This section describes how to use the Google Tag Manager as an editor.
To track personalized components or measure experiment results, Google Tag Manager (GTM) requires some data from the data layer. Your triggers can be set up through the values contained in the data layer.
To setup variables for your website, use the following steps:
- Click on the variable text button.
- Scroll to the second list, and click on the
Newbutton at the top right.
- Give your variable a name and click on the card to choose a variable type. Your variable type should be the
- After choosing a variable type, you need to enter a name for the data layer variable field. The name of this field should be based on the event name of the metadata sent by the Ninetailed SDK.
- Save your variable by clicking the save button.
To setup triggers for your website, use the following steps:
- Click on the trigger text button on your side navigation bar. At the top right of the trigger page, click the
Newbutton to create a new trigger.
See the following steps below to create a trigger :
- You can give your trigger configuration a name at the top left of the trigger page.
- To add a trigger, click the
- After clicking the card, select a trigger type. Choose a custom event to create your own.
- Give the custom event a name and click the save button at the top right.
To create a tag, follow the steps below:
- On the side navigation bar, click the tag text button and click the
newbutton at the top right.
Once the New button is clicked, a new Tag configuration page is displayed.
- Click the card, and choose a tag type. I selected GA4 since it is event-based and for measurement. Ninetailed is events based.
- Select GA4 configuration for configuration tag.
- Enter an event name.
- Add event parameters.
- Click the save button at the top right corner, and you will a dialogue box to add a trigger.
Click add a trigger and choose the trigger you created in the previous steps like below:
- Click the save button at the top right corner to save the configuration.
You can preview our website using the tag assistant to see that events are triggered as they should.
To do this, on your home page, click the preview button at the top right corner of your page like below:
After clicking the Preview button, add your website's domain to the URL field.
Click the connect button and bring any personalized component to the viewport, our tags should be fired.
Notice that our tag Ninetailed Tag was fired.
If you need more information on :