Here’s a list of built-in variables available in Tag Manager.
Variable name | Variable ID | Description |
---|---|---|
CDP Audience | 46505189-34d1-4d98-8418-bd827c3a7c57 | The variable contains a list of audiences to which the visitor belongs. It is only available when licensed for CDP is enabled. |
Campaign | a3f51ab7-ea76-4adc-a839-a32d392df37c | Its value based on the utm_campaign or pk_campaign parameter from URL. |
Click Classes | efc09356-e1f2-40f7-8a0a-4c454429e678 | Contains the class(es) of the clicked element. It changes its value when the visitor clicks an element with the chosen CSS class. |
Click Element | db5a673e-dabe-4dfa-908c-d08b369d08c9 | Contains DOM object of clicked HTML element. |
Click ID | f39468e9-ae2d-4e58-9e2c-73a4d44add6f | Contains the ID of the clicked element. It changes its value when the visitor clicks an element with the chosen ID. |
Click Url | efd3558a-714d-4b33-9edd-2bbeb0b5eaf7 | Contains the URL of the clicked element. It changes its value when the visitor clicks a link with the chosen URL. |
Consents | 67f49c79-bab6-4b0f-95c8-3bf624b6398f | Contains information about the current and previous state of visitor consents. |
Event | 977a1f9d-4fdb-43bf-9549-bdf68a7b69a6 | The name of the event emitted on dataLayer. It changes its value when a chosen custom event occurs in dataLayer. |
External referrer | 6fa9617f-00b8-4bed-8112-ccbb32033c74 | The URL of a page from another website, with a different hostname, that linked to your current website. |
Form Classes | d7c47336-342d-4c9b-b35a-fa13f238ca44 | Contains the class(es) of the submitted form element. It changes its value when the visitor submits a form with the chosen CSS class. |
Form ID | b1504526-de0d-4c27-9ff0-1ee7734561ed | Contains the ID of the submitted form element. It changes its value when the visitor submits a form with the chosen ID. |
Form Name | 028f3993-dc39-4ad1-8602-f6345c91f3bb | Contains the name of the submitted form. |
Form Url | 0e45761b-d00d-4b18-88c1-eb8fc233d3da | Contains 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 elements | 7dead2a9-5804-4cdd-8d73-b04d338952e9 | A variable used in the element presence trigger. It contains the class name of the elements the trigger is set to detect. |
History fragment | d462fb15-d23c-40e2-bc54-494377accccb | Contains the current value of URL fragment identifier (hash). It changes its value when a hash in the page URL meets a defined condition. |
History source | caf01b44-cdbf-4a7e-a7e8-0150744b4e32 | Contains 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 state | c98aff1e-a24a-4ab7-bad4-d7e0f056b42e | Contains 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 content | c2fe42d6-2cbc-45d0-b4df-af92fdbdc2fc | It 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 fragment | 44ef5a4b-4009-4f66-8fb4-c8137c0ed1b0 | Contains 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 state | a489adb8-f2cf-4a09-8b7a-e6a048b943d7 | Contains 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 hostname | 42ff090e-f97c-45b5-8625-21ae26891382 | Contains the hostname from the URL of the current page. |
Page path | e1e2b185-464f-4eb5-8575-feec34c5e281 | Contains the URL path of the current page. |
Page scroll | a9a87b7d-d565-433d-8090-df9d80bf91f5 | It 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 URL | 67ed6060-eace-4370-8ede-a083f7c909f1 | Contains the full URL of the current page. |
Referrer | 8530b589-aaac-42e4-b4c0-dfeef1360ee5 | The URL of the page that linked to the current page. |
Returning visitor | d76335ca-0ae1-4540-8b7e-5ff7acb0d14f | A 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 website | 4a3cbab8-e239-44ca-b1c9-6c1bc5cc3fbd | Its 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 source | 78fec807-3991-4fbc-ad57-238a6960d0b7 | Contains 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 session | 18c827bd-43e2-409a-a25d-cd8b0f6b95f7 | Contains time in seconds from last interaction. |