datascale

Tool

GTM Form Tracking Template for FormAssembly

A GTM template for the full FormAssembly form lifecycle: view, start, step, submit, error, consent-gated straight into the dataLayer. Multi-step and modal forms, SPA-aware, OneTrust consent. Open source under Apache-2.0.

Clean form tracking for FormAssembly, with no data collection of its own and no US tooling. The template loads a small runtime and writes the form lifecycle, consent-gated, into the dataLayer.

View on GitHub →

What it tracks

  • view: the form becomes visible
  • start: first interaction with a field
  • step_N: step change on multi-step forms
  • submit: successful submission
  • error: validation or submission errors

Features

  • Consent gating via OneTrust / OptanonConsent, configurable
  • Multi-step and modal forms
  • SPA navigation without re-tagging
  • Deduplication of repeat events
  • No network calls of its own, just dataLayer.push

Install

  1. Import the template from the GTM Community Template Gallery, or load template.tpl manually.
  2. Set your consent groups. Analytics usually sits on C0002.
  3. Trigger the tag on "Initialization - All Pages".

Licence & code

Apache-2.0. Code on GitHub. The Gallery permalink follows after Google review.

  • Q01
    Does the template collect any data of its own?

    No. It only runs `dataLayer.push`, with no network calls of its own and no external endpoint. What happens to the events is up to your own GTM tags.

  • Q02
    Does it work with multi-step and modal forms?

    Yes. The template reports step changes as `step_N` and treats forms inside modals like regular forms, including after SPA navigation without a page reload.

  • Q03
    Which consent platform is supported?

    OneTrust via `OptanonConsent` is the default, and the consent groups are configurable. In most setups analytics sits on `C0002`.