Quick tip: Google Tag Manager

The Google Tag Manager has established itself as the de facto standard for the integration of tracking scripts. In this way, on the one hand, responsibilities (online marketing vs. programming) are clearly separated and, on the other hand, you can quickly set up and modify tracking via an additional deployment channel. Here are two little tips for setting up triggers.


When creating triggers, the "Match CSS selector" option is very often selected as the firing type. For example, if you enter the value `.foo .bar .button` , the trigger often fails to fire reliably. The reason for this is usually that other HTML elements (such as `<span>` elements for additional styling) can be hidden within the button element. If you then click directly on these child elements, the trigger won't fire – the event isn't propagated (bubbled) up the DOM hierarchy. To avoid this, you repeat the selector and add the universal selector "*". In our example, the complete expression is `.foo .bar .button, .foo .bar .button * .`

As a second tip, since iOS 10.2 (up to the current version) there is an annoying behavior in the Safari browser: If you track mailto: links, under certain circumstances the following message appears after tapping on the link:

Here the trigger type " Click - Links only " was activated with the option " Wait for tags ". This delays the activation of the actual link target, which leads to the aforementioned message. After disabling the option, the problem no longer occurs. Alternatively, you can also use the trigger type " click - all elements " and specify the target as precisely as possible as a link using the CSS selector.

Back