Short JavaScript code snippets for custom javascript variables in Google Tag Manager
Inspired by the 30 seconds code project, we decided to create together to the Google Tag Manager community a series of code snippets to help create custom javascript variables in Google Tag Manager.
See the snippets folder to get all scripts or read 1:1 script;
items
array
in Facebook contents
pattern;view_item
event parameter in Facebook viewContent
parameters;add_to_cart
event parameters in Facebook AddToCart
parameterspurchase
event parameters in Facebook Purchase
parametersclient_id
and session_id
;--- DEPRECATED Google Analytics Universal Analytics are not colleting information since july 2023
add_to_cart
event parametersview_item
event parametersview_item_list
event parametersselect_item
event parametersremove_from_cart
event parametersUse the snippet template as a reference and create in snippets folder.