JS as aTool
JS in console? Okay!
Test CSS selectors in console…
push events
and data…
…debug stuff
9.
JS as aTool
JS in console? Okay!
Test code in console with {{variables}}?
https://gist.github.com/mbaersch/
10.
JS as aTool
JS in console? Okay!
Test code in console with {{variables}}?
https://gist.github.com/mbaersch/
11.
Using JS
… inJS variables
Return a function…
or several functions in a “Lib” variable!
16 / 32 ;)
12.
Using JS
… inJS variables
Using functions from “Lib”
14.
Using JS
… inJS variables
Minimize calls / cache results!
Use long & descriptive names and / or use own
namespace in global scope / persistence!
15.
Using JS
… inJS variables Access dataLayer directly (if no other
references for a dataLayer variable)
Logging? Only in debug mode
16.
Using JS
Useless knowledge(?)
Pushto dataLayer without changing the
actual JS object
… but in GTM (after the next event):
A smart way for sharing sensible
data “only” with your GTM?