The shadow DOM is a way to add HTML structures to the web page so that they remain isolated from the rest of the document object model (DOM). It's a popular concept with web components, as it allows for encapsulation of web structures so that they aren't affected by style declarations of the parent tree, for example. However, being such a “hidden” structure, anything that happens in the shadow DOM is also hidden from Google Tag Manager's listeners.
One of my pet peeves about Google Analytics has to do with nomenclature. For example, a User isn't really a user but a browser instance, and Direct traffic isn't necessarily “direct” at all, but rather just traffic that has no discernible source. But being so invested in content analytics, my biggest gripe has to do with Pageviews. A Pageview in Google Analytics is collected when a hit with the hit type pageview is received successfully by the Google Analytics endpoint.
One of the difficulties of working with Google Tag Manager and the dataLayer structure is that GTM doesn't preserve history of the items collected into its data model. Or, at least, it doesn't preserve it in a manner that would let us access it. This is typically a very niche problem, but it does surface every now and then. For example, say you wanted to query whether an event with some specific value has already been pushed into dataLayer.
Last updated 9 March 2018 with some new tips. The Scroll Depth trigger in Google Tag Manager has a lot going for it. Tracking how far users scroll down a given page has long since been recognized as an important cog in the engagement tracking machine, and there have been really great solutions for implementing scroll depth tracking for web analytics over the years. With Google Tag Manager's native Scroll Depth trigger, it's tempting to think we now have a be-all end-all solution that covers all the bases.
One of the annoying quirks of Google Tag Manager is that it strips out any non-standard HTML attributes from elements you add to Custom HTML tags. I'm using “non-standard” as a qualifier here, because I don't have an exhaustive list of attributes that are ignored. But at least data attributes (e.g. data-id) and attributes with custom names (e.g. aria-labelledby) are either stripped out upon injection, or GTM might actually prevent you from even saving the container if the Custom HTML tag has elements with these attributes.
- OLDER POSTS
- page 1 of 7