Track form events with Google Tag Manager or Meta Pixel
See a form's views and submissions in Google Tag Manager or Meta Pixel, through the embed's event forwarding or a custom domain's code injection.
If you already run Google Tag Manager (GTM) or Meta Pixel on your site, you can have a form made with Tinyform report to the same place, so a form view and a submission sit in the same session as the page views around them.
That matters in a few situations:
- the form is embedded on your website
- your website links to the form
- an ad, a newsletter or a social post sends people straight to the form
In each case you want the form's events tied to the visitor's session on your site rather than counted somewhere else.
There is no GTM or Pixel setting on a form itself. The form offers two ways to reach a tag you already run, described below, and one of them covers only embedded forms.
What events can you track?
An embedded form with event forwarding on announces two things to the page around it:
tinyform_form_view, once, when the form has been shown. For a password-protected form it fires after the password has been accepted, so it counts people who reached the questions.tinyform_form_submit, when the server has accepted the submission. This is the conversion.
Both carry the form's id as formId, so a page holding several forms can tell them apart. The widget hands each event to whichever of these the host page has: it pushes it onto dataLayer for GTM, calls gtag for a direct GA4 tag, and calls fbq with a custom event for Meta Pixel. A page with none of them gets nothing and nothing breaks.
There is no per-page event for a multi-page form: one view is announced per form shown, not one per page. Per-question drop-off is on the Insights tab instead.
The step-by-step GTM setup is in Track form conversions with Google Tag Manager.
For embedded forms: the "Track form events" option
When the form is embedded on your site, the form and the page live on different origins, so a tag on the page cannot see inside the frame. The embed has a switch for this.
Open the embed dialog
On the form'sSharetab, underEmbed Form, pick the embed type you use and open its options.Turn on Track form events
Switch onTrack form events. It is off by default: a form should not report its visitors to a third party unless its author decided so.Copy and paste the code
PressGet the codeand paste the snippet into your page where the form belongs. The switch travels on the frame's address, so an embed copied before you turned it on has to be replaced.Have GTM or the Pixel on the page
The host page must already load your GTM container or Pixel. The form only hands its events to what is there.
From then on a form view and a submission arrive beside your page's own events.
This route covers embedded forms only. A visitor who opens the form as a page of its own, from a campaign link for instance, is not on your site, and the frame has no host page to talk to.
For a form on its own page: a custom domain with code injection
A form served from a custom domain that matches your site, say forms.example.com next to www.example.com, shares the site's first-party cookies, so a GTM container or Pixel installed on both sees one session across them.
Connect the domain
Follow Custom domains and give the form a pretty URL on it.Install the tag on both hosts
Put the same GTM container or Pixel snippet on your website and, for the form's domain, intoDomains, the domain,General settings,Code injection. See Code injection.Send people to the domain's address
Link to the form at its custom-domain address, or embed it with theCustom domainswitch on in the embed dialog, so the frame is served from your own host.
What the tag sees on that page is its own page view of the form. A form on a page of its own does not push tinyform_form_submit into the page's dataLayer; that message only exists between a frame and its host. To count a submission there, turn on Redirect on completion under Settings, General, and send the visitor to a thank-you page you already track; @Submission ID can be mentioned in the redirect URL.
The two routes combine well: an embed served from the custom domain with Track form events on gives you one origin and both events.
Without any tag
The form's Insights tab counts views, submissions and unique respondents on the server, shows sources, devices, countries and browsers under Visits, and draws the per-question funnel under Drop-offs, all without a tag on any page. See Form Insights.