Variables
Read and shape data: built-ins, the dataLayer, the DOM, and lookup & RegEx tables.
Beginner
5 lessons- 1Start →
Built-in page variables
Surface Page URL, Path, Hostname and Referrer as built-in variables.
- 2Start →
Constant variables
Store a value once (like a Measurement ID) and reuse it across tags.
- 3Start →
Auto-Event Variables
Read the clicked element's attribute with an Auto-Event Variable.
- 4Start →
URL & query variables
Read UTM and other query parameters with the URL variable.
- 5Start →
JavaScript variable
Read a global page variable (window.siteData) with a JavaScript variable.
Intermediate
7 lessons- 6Start →
Data Layer variables
A rich, nested dataLayer, read it with dot-notation variables and a custom event.
- 7Start →
Scrape data from the DOM
Product details live only in the markup, no dataLayer. Build variables that read them.
- 8Start →
Normalize DOM data
Use a Custom JS variable to clean a messy price string into a number.
- 9Start →
Lookup Table variable
Map a path to a page category with a Lookup Table variable.
- 10Start →
RegEx Table variable
Bucket URLs into values with a RegEx Table variable.
- 12Start →
localStorage & sessionStorage
Persist client-side state in web storage and read it with a Custom JS variable.