GTM quirk #17: beware the ‘!’
DataStudio quirk #15: adding segments to blended data
In CSS, using the ‘!’ in Class or Id names is not recommended. Technically it’s an invalid character, and certainly in Google Tag Manager your Triggers based on any CSS element that includes a ‘!’ in its name will not work. You’ll need to escape the ! (‘\!’) to get the trigger to fire.
Using hidden fields in Google Tag Manager events
If you decide to update a scorecard (for example) by adding a segment to a data source, you’ll also need to edit any blends that refer to that scorecard – in other words, blended charts don’t inherit changes to their source data.
Tracking changes in form dropdowns using Google Tag Manager.
There will come a time, trust me, when you’ll need to capture the value of a hidden field to use in the label of an event. Here’s how. A pre-requisite though – the field will need to have an CSS Id to uniquely identify it. First, define a Custom Variable that’s of the type DOM […]
Why GTM Preview Mode might not work on your site
It’s inevitable that at some point you’ll be asked to report on form dropdown field values/changes in analytics. GTM does make the task doable. Here’s how. 1. Define a *Custom HTML tag* that’ll capture the event: Change the select# to your required dropdown ID. If you’re tracking multiple forms you might also want to change […]
I was trying to run a Preview of Google Tag Manager for a site I was working on, but for some reason it simply wasn’t showing. Turning to the Console as always when something unexpected happens (or doesn’t happen), I saw an error message about my ‘Content Security Policy directive’ being violated. Basically, a CSP […]