Updated 1 October 2019 With ITP 2.3 it looks like Safari is reducing the usefulness of localStorage as well, so this solution should not be considered future-proof. The only stable way to persist client-side data at the moment seems to be HTTP cookies. Updated 7 March 2019 - Added some extra caveats to this solution. Also, be sure to read my article on ITP 2.1, which has far more detail on what Intelligent Tracking Prevention is and how to work with it.
A recurring question in the Google Tag Manager communities (e.g. product forums) is how to use an Enhanced Ecommerce dataLayer object with the Facebook pixel code? It’s a common question since running a Facebook conversion pixel on a site that also collects data from the store into Google Analytics’ Enhanced Ecommerce reports is probably a very typical scenario. Side note: Since Google+ is about to go the way of the dodo, I’ve created an archive of the entire community which you can browse and make text searches against.
If you are enjoying the Element Visibility trigger as much as I am, you’ll be glad to know of a very simple tip that might make your life easier when using Google Tag Manager. The tip is this: If you’ve activated the built-in Click variables, they will be automatically populated with details about the element that caused the Element Visibility trigger to activate! Tip 92: Use Built-in variables to analyze the visible element Yes, it’s confusing they’re still named Click variables, especially since they’re duplicated in the Form variables, and even more so since they can be used with the Element Visibility trigger to identify which element became visibility.
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.
While using the Google Tag Manager user interface around Halloween 2018, you might have noticed a new tab in Google Tag Manager’s Preview mode. The tab is named Errors and shows you the number of exceptions thrown by GTM’s tag templates on the page. In this short #GTMTips post, I’ll quickly walk you through what the tab shows. Tip 90: The Errors Tab In Preview Mode The tab’s name is an apt description of what the tab shows.