Click trigger

Tag Manager

A click trigger fires a tag on any click on all pages, but you can adjust its conditions so that the tag fires when a visitor clicks a certain element on the website.

Click trigger in Piwik PRO

You can choose from the following conditions:

  • Click ID: Fires when a visitor clicks an element with the chosen ID.
  • Click URL: Fires when a visitor clicks a link with the chosen URL.
  • Click classes: Fires when a visitor clicks an element with the chosen CSS class.
  • Click element: Fires when a visitor clicks an element with the chosen CSS or XPath selector.
  • Page URL: Fires when a visitor clicks an element on a page with the chosen URL. For example, a visitor is on https://clearbank.com/product-tour and clicks the chosen element.
  • Page path: Fires when a visitor clicks an element on a page with the chosen page path. For example, a visitor is on /product-tour and clicks the chosen element.
  • Page hostname: Fires when a visitor clicks an element on a website with the chosen hostname. For example, a visitor clicks an element on all pages for clearbank.com.
  • Referrer: Fires when a visitor clicks an element on any page to which they were referred by the chosen referrer. For example, a visitor comes from https://clearbank.com/blog to any page and clicks an element on that page.
  • External referrer: Fires when a visitor clicks an element on any page to which they were referred by the chosen external referrer. For example, a visitor comes from https://medium to any page on your website and clicks an element on that page.
  • Campaign: Fires when a visitor clicks an element on any page to which they were referred by the chosen campaign (based on a utm_campaign parameter).
  • Traffic source: Fires when a visitor clicks an element on any page to which they came from the chosen traffic source: campaign, organic search, social, referral, direct.
  • Returning visitor: Fires when a returning visitor clicks an element on the chosen page (this mechanism is based on the Piwik PRO Tag Manager cookie).
  • Variables: Any added variable will show up on the list of conditions and you can use it to define trigger conditions.

Tip: Learn more about how to use XPath in a click trigger.

Was this article helpful?

Technical support

If you still have some questions, visit our community.
There’s always someone ready to help!

Back to help center