Built-in variables

Here’s a list of built-in variables available in Tag Manager.

Variable nameVariable IDDescription
CDP Audience46505189-34d1-4d98-8418-bd827c3a7c57The variable contains a list of audiences to which the visitor belongs. It is only available when licensed for CDP is enabled.
Campaigna3f51ab7-ea76-4adc-a839-a32d392df37cIts value based on the utm_campaign or pk_campaign parameter from URL.
Click Classesefc09356-e1f2-40f7-8a0a-4c454429e678Contains the class(es) of the clicked element. It changes its value when the visitor clicks an element with the chosen CSS class.
Click Elementdb5a673e-dabe-4dfa-908c-d08b369d08c9Contains DOM object of clicked HTML element.
Click IDf39468e9-ae2d-4e58-9e2c-73a4d44add6fContains the ID of the clicked element. It changes its value when the visitor clicks an element with the chosen ID.
Click Urlefd3558a-714d-4b33-9edd-2bbeb0b5eaf7Contains the URL of the clicked element. It changes its value when the visitor clicks a link with the chosen URL.
Consents67f49c79-bab6-4b0f-95c8-3bf624b6398fContains information about the current and previous state of visitor consents.
Event977a1f9d-4fdb-43bf-9549-bdf68a7b69a6The name of the event emitted on dataLayer. It changes its value when a chosen custom event occurs in dataLayer.
External referrer6fa9617f-00b8-4bed-8112-ccbb32033c74The URL of a page from another website, with a different hostname, that linked to your current website.
Form Classesd7c47336-342d-4c9b-b35a-fa13f238ca44Contains the class(es) of the submitted form element. It changes its value when the visitor submits a form with the chosen CSS class.
Form IDb1504526-de0d-4c27-9ff0-1ee7734561edContains the ID of the submitted form element. It changes its value when the visitor submits a form with the chosen ID.
Form Name028f3993-dc39-4ad1-8602-f6345c91f3bbContains the name of the submitted form.
Form Url0e45761b-d00d-4b18-88c1-eb8fc233d3daContains the URL of the submitted form element. It changes its value when the visitor submits a form that sends a request to the chosen URL.
Found elements7dead2a9-5804-4cdd-8d73-b04d338952e9A variable used in the element presence trigger. It contains the class name of the elements the trigger is set to detect.
History fragmentd462fb15-d23c-40e2-bc54-494377accccbContains the current value of URL fragment identifier (hash). It changes its value when a hash in the page URL meets a defined condition.
History sourcecaf01b44-cdbf-4a7e-a7e8-0150744b4e32Contains information about the last method/event that updated the history object. It changes its value when a pushState, replaceState, popState or hashchange event occurs.
History statec98aff1e-a24a-4ab7-bad4-d7e0f056b42eContains the current value of HTML5 history state which is of type any. It changes its value when a history state meets a defined condition.
Leave contentc2fe42d6-2cbc-45d0-b4df-af92fdbdc2fcIt changes its value when the cursor leaves a page. You can choose two options for this condition: page exit intent — the cursor leaves page via top edge or cursor leaving the browser's area — the cursor leaves page via any edge.
Old history fragment44ef5a4b-4009-4f66-8fb4-c8137c0ed1b0Contains the previous value of the URL fragment identifier (hash). It changes its value when the previous hash in the page URL meets a defined condition.
Old history statea489adb8-f2cf-4a09-8b7a-e6a048b943d7Contains the previous value of the HTML5 history state, which can be any type. It changes its value when the previous history state meets a defined condition.
Page hostname42ff090e-f97c-45b5-8625-21ae26891382Contains the hostname from the URL of the current page.
Page pathe1e2b185-464f-4eb5-8575-feec34c5e281Contains the URL path of the current page.
Page scrolla9a87b7d-d565-433d-8090-df9d80bf91f5It changes its value when the visitor scrolls to the chosen point on the page. For example, the visitor scrolls 50% of the page or scrolls to 1440 px on the page.
Page URL67ed6060-eace-4370-8ede-a083f7c909f1Contains the full URL of the current page.
Referrer8530b589-aaac-42e4-b4c0-dfeef1360ee5The URL of the page that linked to the current page.
Returning visitord76335ca-0ae1-4540-8b7e-5ff7acb0d14fA logical condition that determines whether this is the user’s first visit. Its value changes when a returning visitor clicks an element on the selected page. This mechanism is based on cookies.
Time on website4a3cbab8-e239-44ca-b1c9-6c1bc5cc3fbdIts value changes when a visitor stays on the website or page for a specific amount of time. For example, it triggers a tag when a visitor spends at least 15 seconds on a page or website.
Traffic source78fec807-3991-4fbc-ad57-238a6960d0b7Contains traffic source: campaign, organic search, social, website, direct. It changes its value when the visitor clicks an element on any page to which they came from the chosen traffic source: campaign, organic search, social, referral, direct.
View within session18c827bd-43e2-409a-a25d-cd8b0f6b95f7Contains time in seconds from last interaction.