Built-In Variables And Context
Built-in variables are values the Tag Manager runtime exposes without a custom variable record.
They appear in the variable picker alongside custom variables and use the same
{{placeholder_name}} syntax.
Built-in variable groups
Clicks
Clicked element classes, target, ID, text, and URL.
Values are populated from the current click event.Forms
Form ID, target, text, and URL.
Values are populated from the current form submit event.Pages
Page hostname, page URL, referrer, referrer domain, and time on page.
Values come from the current browser page and runtime start time.Scrolling
Scroll depth threshold.
Values are populated from the current Scroll Depth trigger event.Utilities
Custom event name and random number.
Values come from the current custom event context or runtime generation.Nitoriq
Nitoriq click ID, external ID, visit ID, visitor ID, campaign ID, workspace ID, issued-at, and expires-at values.
Values come from Nitoriq tracking context when it is available on the page.Built-In Placeholder Reference
Click event placeholders:
{{clicked_element_url}}
{{clicked_element_text}}
{{clicked_element_id}}
{{clicked_element_classes}}
{{clicked_element_target}}Form event placeholders:
{{form_id}}
{{form_target}}
{{form_text}}
{{form_url}}Page placeholders:
{{page_url}}
{{page_hostname}}
{{referrer}}
{{referrer_domain}}
{{time_on_page}}Scrolling placeholders:
{{scroll_depth_threshold}}Utility placeholders:
{{custom_event_name}}
{{random_number}}Nitoriq placeholders:
{{niq_click_id}}
{{niq_external_id}}
{{niq_visit_id}}
{{niq_visitor_id}}
{{niq_campaign_id}}
{{niq_workspace_id}}
{{niq_issued_at}}
{{niq_expires_at}}Context-Specific Values
Some built-ins depend on the event that is currently firing a tag.
Click placeholders resolve from the click event. Form placeholders resolve from
the form submit event. {{custom_event_name}} resolves from the current custom
event. {{scroll_depth_threshold}} resolves from the current Scroll Depth
event to the percentage just reached, such as 25 or 50, and is empty for
any other event. Page and Nitoriq placeholders are available from the page/runtime
context.
Custom variables cannot use the same names as built-in variables. Publishing checks for built-in name conflicts.
Built-ins are used correctly when
- the placeholder appears in the template picker
- event-specific placeholders are used in matching event contexts
- custom variables do not reuse built-in placeholder names
- the published tag output contains the resolved built-in value
Was this page helpful?