Enable Google Tag Manager integration
Google Tag Manager (GTM) integration is a single-click solution to help you find visits. You can search for visits that caught your eye in Google analytics tools. You can also find any visit to pages where a specific JavaScript code pushes data to GTM dataLayer.
If you have GTM installed on your page, flick the switch in CUX to get started. When GTM integration is enabled, you can go to your recordings and find a specific visit using GTM event names.
Enabling GTM integration
To enable the GTM integration, log in to CUX and go to Integrations. Find the Google Tag Manager tile and enable integration.
Everything works in an instant. If you have GTM on your page, our script becomes aware of it and collects information straight from the GTM dataLayer.
Watching visits that triggered GTM events
To watch a visit that has been tracked by GTM, go to Visits.
- Click Open filters.
- Scroll to find GTM event section in filters.
- Fill the Property and Value fields you want to use in your search.
Important When entering the Property, make sure to use the exact name that gets sent to GTM. Typically, you would enter an event name that you or your developers use in the JavaScript code of your site. You can naturally refer to the default GTM event names. In the Value field, you can enter wildcards (asterisk symbol “*”) or regular expressions. In this way, you can match a wider number of object values and limit the number of conditions you use in your search.
- Click Apply.
- The visit list updates automatically showing all the visits that triggered a specific type of GTM event.
Example
Let’s say you have a new best selling book in your online book store. You wanted to test new functionality on a highly visited page. You’ve just introduced video clips where book authors talk about their work. At the end of each clip, they reveal a promotional code that allows customers to order a signed copy. The functionality is up on your site for several days, yet the number of signed copies is way below your expectations. The website traffic indicates people watch videos. So what’s up?
Log in to CUX and inspect some visits. You won’t need to watch recordings one by one. Go to Visits and open filters. Scroll to find GTM event. Enter the details you’ve received from your developer. For example, your promotional page pushes the following objects into the dataLayer:
Tada! The visit list is filtered, and you can watch the recordings to find out why things look the other way you expected. Do they get to see the video? Is the promo code not audible? Is the video cropped wrongly? Go through the list, hit Play, and see for yourself.
Technicalities
When CUX code starts on the page, we check if the dataLayer exists. When we find it, we start “listening” to find out all objects that are sent to this particular layer. This helps us be prepared for most of the query parameters you want to use when filtering the visit list.
If a dataLayer doesn’t exist, we’ll wait until it’s there. This doesn’t affect the regular work of our script. If we can’t find a dataLayer, we keep working, record the visits, and provide the recordings. In this case, naturally, you won’t be able to filter visits using GTM parameters.