10. Why it’s about marketing.
1. Tags collect data for digital marketing purposes, first and
foremost.
2. TMS abstracts the underlying code — low barrier of entry
for people with little coding experience.
3. Semantic data collection is often deprioritized by
developers who are more invested in the presentational
and experiential layers. TMS is a tool which prioritizes this
semantic data layer.
11. Why it’s about development.
1. It’s a freaking code injector!
2. You can add all sorts of malicious / website-breaking /
malware-infested code with the click of a button.
3. If something goes awry, developers will be held
accountable as they own the processes.
4. A TMS can actually make development work easier, too.
12. Why it’s about organizations.
1. Data flows through the entire organization - it doesn’t
care about job titles.
2. Data quality can be compromised at every junction of the
data process - not just collection.
3. Any company/platform/tool/service collects absurd
amounts of data each passing second - only a mature
organization can tackle this overload.
17. #1You can add the container JavaScript anywhere on the page or
even a linked JavaScript library.
The current recommendation is to add it to the <head> of the
document, but this is by no means mandatory.
18.
19. #2You can add multiple container snippets on the page, but they must
all use the same dataLayer object name.
20.
21. #3 Google Tag Manager only cares about the .push() method when
working with the dataLayer Array.
35. #10 dataLayer.push() copies the pushed key-value pairs into
GTM’s internal data model, where they (can) overwrite any pre-existing
values for the given keys.
36.
37. #11 Preview Mode shows the state of tags, triggers, and variables
at the time of each dataLayer message.
43. #14 Google Tag Manager creates a new Universal Analytics tracker
with every single tag instance.
44.
45. #15 Get the object representation of GTM’s dataLayer easily.
46.
47. #16 Use Data Layer in Enhanced Ecommerce settings leverages the
Version 1 of the Data Layer Variable.
48.
49. #17Version 1 of the Data Layer Variable only returns the most recent
value stored in the given Data Layer Variable name.
Version 2 provides dot notation support as well as recursive merge.
50.
51. #18The Custom JavaScript Variable method for implementing
Enhanced Ecommerce tags is more flexible than "Use Data Layer".
The Custom JavaScript Variable lets you mutate the
Enhanced Ecommerce payload in Google Tag Manager.
52.
53. #19 If click propagation is stopped, use the Click / All Elements trigger.
54.
55. #20 Wait for Tags pauses the original event, but be careful!
56.
57. #21Type this in the JavaScript console to sort Custom Dimension fields by
index number.
var el=document.querySelector('[diff-field$="customDimensionSection"]');var rows=el.querySelectorAll(".simple-table-row[data-ng-repeat]");var newRows=[];rows.forEach(function(row){var
inputIdx=row.querySelectorAll('input[type="text"]')[0];var inputVal=row.querySelectorAll('input[type="text"]')
[1];newRows.push({idx:inputIdx.value,val:inputVal.value})});newRows.sort(function(a,b){if(parseInt(a.idx)>parseInt(b.idx)){return 1}if(parseInt(a.idx)<parseInt(b.idx)){return-1}return
0});rows.forEach(function(row,i){var inputIdx=row.querySelectorAll('input[type="text"]')[0];var inputVal=row.querySelectorAll('input[type="text"]')
[1];inputIdx.value=newRows[i].idx;inputVal.value=newRows[i].val;inputIdx.dispatchEvent(new Event("change"));inputVal.dispatchEvent(new Event("change"))});