TagSpy

form_submit

Enhanced measurementweb

Automatically triggered when the user submits a form Note: You can only use the parameters in your reports if you create custom dimensions for them.

Platforms
web
When it fires
Collected automatically; no code needed.
Official docs

Parameters (4)

ParameterTypeRequiredDescriptionExample
form_id--HTML id attribute of DOM element-
form_name--HTML name attribute of DOM element-
form_destination--Action attribute of DOM element (where form data is sent)-
form_submit_text--Text of the submit button-

Example

gtag.js
gtag('event', 'form_submit', {
  form_id: '...',
  form_name: '...',
  form_destination: '...',
  form_submit_text: '...',
});
GTM dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'form_submit',
  form_id: '...',
  form_name: '...',
  form_destination: '...',
  form_submit_text: '...',
});

Also see