One tag for nine platforms
If a client runs more than one form platform, or you manage many containers, install one tag instead of one listener per platform. The Universal tracker detects which platforms are on the page and uses each one’s own success signal.
| Platform | Success signal | Event prefix |
|---|---|---|
| SwipePages | amp-form-submit-success class |
swipe_form |
| Gravity Forms | gform_confirmation_loaded, confirmation wrapper, postback pages |
gf_form |
| Unbounce | Confirmation render after submit, HTML5 invalid for failures |
unbounce_form |
| Elementor Pro | submit_success + .elementor-message-success |
elementor_form |
| GoHighLevel (inline and iframe) | Confirmation render, verified postMessage from the iframe |
ghl_form |
| Kartra | Confirmation render, error border class for failures | kartra_form |
| WPForms | wpformsAjaxSubmitSuccess, confirmation container, postback pages |
wpforms_form |
| Squarespace | 2xx from /api/form/ + submission message |
squarespace_form |
| Contact Form 7 | wpcf7mailsent + data-status="sent" |
cf7_form |
One GTM trigger catches every success event:
^(swipe|gf|unbounce|elementor|ghl|kartra|wpforms|squarespace|cf7)_form_success$
What v3.3.0 adds
- Five new platforms: Elementor Pro, Kartra, WPForms, Squarespace and Contact Form 7.
ec_event_idon every event for Meta CAPI deduplication, andec_detection_methodso you can see how each lead was detected.- A 5-minute dedupe ledger, optional SHA-256 hashing, and first and last touch attribution with click IDs.
- Enhanced Conversions keys for first and last name, company and address, and E.164 phone normalization.
- A consent queue: events raised while analytics consent is denied are replayed when it is granted.
strictSuccessto drop inferred successes, plus failure diagnostics and astatus()debug API.- No existing event name or key changed, so v2.0.0 triggers keep working.
Universal or a single-platform listener?
Both run the same v3 core, so hashing, dedupe and event IDs are the same. Use a single-platform listener when the site runs one form platform: it is roughly half the size. Use the Universal tag when one site mixes platforms or you want one install across many containers. Never run the Universal tag and a single-platform listener for the same platform on one page, or each lead is counted twice.
Install it
Option A: import the GTM container (no code)
- Download the container JSON above.
- In GTM go to Admin, Import Container, choose Merge and Rename conflicting tags.
- Open the variable
Const - GA4 Measurement IDand replace the placeholder with your own ID. - Preview, submit a test form, confirm a
*_form_successevent, then publish.
Option B: paste the tag yourself
- Download the GTM tag above. It includes the
<script>wrapper and a production config block, and fits under GTM’s Custom HTML size limit. - Create a Custom HTML tag, paste it in and trigger it on All Pages (or Consent Initialization if you use a CMP).
- Create a Custom Event trigger with the regex above (regex matching on) and attach your GA4, Google Ads, Meta or server-side GTM tags.
Configuration and consent
| Key | Default | Notes |
|---|---|---|
debug |
false |
Console logs. Testing only |
hashPii |
false |
Adds ec_email_sha256 and ec_phone_sha256 (needs HTTPS) |
rawFields |
false |
Leaves ec_raw_fields out of the payload |
dedupe |
true |
Suppresses a repeat success for the same form and person within 5 minutes |
strictSuccess |
false |
true drops inferred successes (pagehide, form_removed) |
defaultCountryCode |
'1' |
Phone E.164 fallback. A country field on the form takes priority |
countryCodeField |
'' |
Exact field name that holds an ISO2 or dial code |
redactFields |
[] |
Extra field names to strip. Password, card, SSN and IBAN fields are always stripped |
platforms |
all | Limit detection, e.g. ['cf7','gravityforms'] |
The tracker auto-detects Google Consent Mode v2, OneTrust and Cookiebot. With analytics consent denied, nothing fires and nothing is stored. With PII consent denied, events fire without contact data. Any other CMP can be wired in with window.EC_FORM_CONSENT_CHECK.
Keep PII out of GA4
The payload can include ec_name, ec_email, ec_phone and address keys. GA4’s terms prohibit PII in event parameters, so use them only for Enhanced Conversions, Meta CAPI or first-party CRM workflows, and send form_id, form_platform and ec_detection_method to GA4.
Test it before you publish
- Submit a valid form on each platform you use. Expect one success event per submit.
- Submit with a required field empty. Expect the platform’s
_form_failedevent. - Run
window._ecFormTracker.status()to see detected platforms, attached forms, consent state and the last event.
Known limitations
- The GoHighLevel iframe message format is reverse-engineered. If GoHighLevel changes it, that path stops firing until updated.
- Inferred successes (
pagehide,form_removed) are on by default. SetstrictSuccess: trueto drop them. - Platforms change their markup. Test on the live page before publishing.
- Bot or spam submissions that pass the platform’s own validation still count as success.
Changelog
- 3.3.0: nine platforms,
ec_event_id, detection methods, dedupe, hashing, attribution, consent replay, expanded Enhanced Conversions keys andstrictSuccess. The container import ships the v3.3.0 tag. - 2.0.0: SwipePages, Gravity Forms, GoHighLevel and Unbounce, with consent gate, PII redaction and failure tracking.