Form submission trigger

Tag Manager

A form submission trigger fires a tag when a visitor submits a form on your site. By default, it fires the tag for any form on any page. However, you can change its settings so that the tag fires for a specific form, specific page or under specific conditions.

Form submission trigger in Piwik PRO

Here’s a list of conditions available in this trigger.

Event conditions

Condition type Description Example
Form ID Fires the tag when a visitor submits a form with the selected ID. Form ID contains contact-form
Form URL Fires the tag when a visitor submits a form that sends a request to the selected page URL. Form URL equals https://clearbank.com/contact-requests
Form Classes Fires the tag when a visitor submits a form with the selected CSS class. Form Classes contains emergency-contact
Form Name Fires when a visitor submits a form with the selected name. Form Name equals emergencyContact
Page URL Fires the tag when a visitor submits a form on a page with the selected page URL. For example, a visitor submits a form on https://clearbank.com/product-tour. Page Url equals https://clearbank.com/product-tour/
Page path Fires the tag when a visitor submits a form on a page with the selected page path. For example, a visitor submits a form on the page that contains the path /product-tour. Page Path contains /product-tour
Page hostname Fires the tag when a visitor submits a form on a page hosted on the selected domain. For example, a visitor submits a form on the page that is hosted on clearbank.com. Page Hostname equals clearbank.com
Referrer Fires the tag when a visitor a visitor submits a form 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 submits a form. Referrer equals https://clearbank.com/blog
External referrer Fires the tag when a visitor submits a form 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 submits a form. External referrer equals https://google.com
Campaign Fires the tag when a visitor submits a form 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 submits a form on a page to which they were directed by the selected traffic source and the selected element is present.

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 submits a form. 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. ––

Note: If a form field returns a native HTML5 validation error, the form submission trigger won’t fire your tag.

Tip: Learn more about trigger conditions.

Was this article helpful?

Technical support

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

Back to help center