A click trigger fires a tag when a visitor clicks anywhere on your website. By default, it works for any click on any page. However, you can change it so that the tag fires when a visitor clicks on a specific element or meets other conditions.
Note: This trigger has the option: Wait for tags before loading the next page.
When turned on: Tags will have some extra time to fire before links are opened. The delay time is set in Administration > Sites & apps > Delay loading the next page. A delay is recommended if some action needs to happen before the redirect.
When turned off: Tags will fire without any delay. This is the recommended setting for most use cases.
Here’s a list of conditions available in this trigger.
Event conditions
Condition type | Description | Example |
---|---|---|
Click ID | Fires the tag when a visitor clicks on an element with the selected ID. | Click ID equals item-123 |
Click URL | Fires the tag when a visitor clicks a link with the selected URL. | Click URL equals https://clearbank.com/big-promo/ |
Click Classes | Fires the tag when a visitor clicks an element with the selected CSS class. | Click Classes contains primary_button |
Click Element |
Fires the tag when a visitor clicks an element with the selected CSS class or XPath selector. Note: Learn more about using XPath in a click trigger. |
Click Element matches .promo_banner |
Page URL | Fires the tag when a visitor clicks an element on a page with the selected page URL. For example, a visitor is on the page https://clearbank.com/product-tour and clicks the selected element. |
Page Url equals https://clearbank.com/product-tour/ |
Page path | Fires the tag when a visitor clicks an element on a page with the selected page path. For example, a visitor is on the page that contains the path /product-tour and clicks the selected element. |
Page Path contains /product-tour |
Page hostname | Fires the tag when a visitor clicks an element on a page hosted on the selected domain. For example, a visitor is on the page that is hosted on clearbank.com and clicks the selected element. |
Page Hostname equals clearbank.com |
Referrer | Fires the tag when a visitor clicks an element on a page to which they were directed by the selected referrer. This referrer is internal, meaning that it belongs to the same domain as your site. For example, a visitor comes from https://clearbank.com/blog and clicks the selected element. |
Referrer equals https://clearbank.com/blog |
External referrer | Fires the tag when a visitor clicks an element on a page to which they were directed by the selected external referrer. This referrer is external, meaning that it has a different domain than your site. For example, a visitor comes from https://google.com and clicks the selected element. |
External referrer equals https://google.com |
Campaign | Fires the tag when a visitor clicks an element on a page to which they were directed by the selected campaign (based on the utm_campaign parameter). | Campaign equals winter-promo |
Traffic source |
Fires the tag when a visitor clicks an element on a page to which they were directed by the selected traffic source. Possible values: campaign, organic search, social, referral, direct. |
Traffic source equals direct |
Returning visitor | Fires the tag when a visitor is a returning visitor and clicks an element on a page. The returning visitor is recognized by Tag Manager, which uses the stg_returning_visitor cookie. | Returning visitor is true |
Variable-based conditions | Any variable you add will appear in the list of conditions and you can use it to define trigger conditions. | –– |
Tip: Learn more about trigger conditions.