Resources
What | Type | Link |
---|---|---|
Official Dev Guide | Guide | Dev Guide |
Simo Ahava's Site (of course) | Industry Leader Blog / Tips | simoahava.com |
Trigger and JS Breakdown (mine) | Guide | joshuatz.com |
Push
Practically anything can be pushed to the global dataLayer
(whether or not you have a trigger/tag/variable to read it is another thing altogether).
// Push an event
dataLayer.push({
'event': 'videoPlay'
});
// ... with details
dataLayer.push({
'event': 'videoPlay',
'progress': 50,
'abc': 'def'
});
// Or push anything!
dataLayer.push({
'lorem': 'ipsum'
});