On each block, including the global blocks - we have a new section - called GTM. In this section - you can setup custom events on clicks of buttons within the block.
Alongside with the event - a DataLayer will send more information to GTM:
In GTM - you have to operate with the following elements:
All required and used variables are already created in GTM, but you can add new ones if you will need (but for this - we have to send them also from the CMS via DataLayers. For now - you do not have to make anything here.
Your first step is to setup a trigger in GTM - which will match with the event name you created in the CMS
Choose Trigger type - Custom event and fill in the title and the event name you used on the CMS for the block
And the final step in GTM is to setup you tags. You will have flexibility here to choose where to send the information (GA4 / Mouseflow / etc.)
Let's take the first example with the GA4.
G-WE8EG3WKD3)
In the GA4 - events are coming in by default. The only thing you need to configure is the Custom dimensions / metrics.
Custom dimensions are used for text values (variables) and Custom metrics for digits values (variables) (as currency).
You can add them by going to Settings -> Custom dimensions
Here you have to enter your variable name in Dimension name and Event parameter.