# GTM statistics

## Introduction

Google Tag Manager functionality is available for:

* components,
* session variables.

Each supported component available in Eximee Designer can be configured for Google Tag Manager functionality. The functionality should first be enabled on the application, and then on individual components according to the sections below.

## GTM configuration for a component

Configuring the GTM tag consists of selecting the option **Activate GTM** in the **Other** section of a given component's properties (by default, the property is unchecked). It is also possible to change the default tag name to a custom name in the GTM Tag field. When the GTM Tag field is empty, the tag name is the same as in the mid field. The configuration for all components is identical.

## GTM configuration for session variables

Configuring GTM for session variables consists of setting the session variable as **Exposed** and enabling the **Gtm** option (activated by clicking **Exposed**). It is possible to change the tag name in the GTM Tag field. The default tag name is the session variable's mid.

## Components supporting Google Tag Manager

* Trigger (Button)
* Checkbox
* Checkbox section (CheckboxSection)
* Value selection from a list (Combobox)
* Date (DatePicker)
* ExternalSection
* Plus minus
* Radio group (RadioGroup)
* Statements on the layer (StatementPopup)
* Step slider
* Text area (TextArea)
* Text field (TextField)
* Slider

## GTM integration information

Changes on the application are sent to Google Tag Manager and there, using the GTM data layer (webformsDataLayer), they can be used to create rules and tags, which can then be used to track user behavior on the application (for example, using platforms such as GA4).

As a result of changing the value of a component that has been allowed to send a tag to Google Tag Manager, two entries appear in the GTM data layer (webformsDataLayer):

* **event** - whose value corresponds to the gtmTagName field of the application component. If the value of this field is empty and the pushTagsToGtm property is checked, then event takes the value of the component's mid field,
* **eventValue** - whose value corresponds to the new value of the component.

As a result of entering the application, the following entries appear in the GTM data layer (webformsDataLayer):

* **formName** - the name of the application.
