Element presence trigger

Tag Manager

Available from 16.15.0

An element presence trigger fires a tag when a given element, like a button or form, is on a page. If the element is added after the page view, the trigger will also find it.

By default, the tag fires whenever a given element is present on the page, but you can adjust its conditions so that the tag fires for a certain page.

Element presence trigger in Piwik PRO

You can choose from the following conditions:

  • Page URL: Fires when the given element is on a page with the chosen URL. For example, a visitor is on https://clearbank.com/product-tour and the given element is present on the page.
  • Page path: Fires when a given element is on a page with the chosen page path. For example, a visitor is on clearbank.com/ and the given element is present on the page.
  • Page hostname: Fires when a given element is on a website or page with the chosen hostname. For example, a visitor sees an element on all pages for clearbank.com.
  • History source: Fires a tag when a specific history event occurs (pushState, replaceState, popState, or hashchange).

    Tip: For more on a history object, read this article.

  • History fragment: Fires a tag when a hash in the page URL meets a defined condition.
  • Old history fragment: Fires a tag when a previous hash in the page URL meets a defined condition.

    Tip: For more on a hashchange, see this article.

  • History state: Fires a tag when a history state meets a defined condition.
  • Old history state: Fires a tag when a previous history state meets a defined condition.

    Tip: For more on history.state, see this article.

  • Referrer: Fires when a given element is on any page to which the visitor was referred by the chosen referrer. For example, a visitor comes from https://clearbank.com/blog to any page and sees an element on that page.
  • External referrer: Fires when a given element is on any page to which the visitor was referred by the chosen external referrer. For example, a visitor comes from https://clearbank.com/blog to any page on your website and sees an element on that page.
  • Campaign: Fires when a given element is on the website or page to which a visitor was referred by the chosen campaign (based on a utm_campaign parameter)
  • Traffic source: Fires when a given element is on any page to which the visitor came from the chosen traffic source: campaign, organic search, social, referral, direct.
  • Returning visitor: Fires a tag when a returning visitor is on the website or page and a given element is present on this website or 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.

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