Directory / plugin
Choice Universal Form Tracker for Google Tag Manager
v3.30.1 · by jaffray
Track Contact Form 7, Gravity Forms, Ninja Forms, Elementor and Avada form submissions in Google Tag Manager, with UTM and click ID attribution.
About this plugin
Five form plugins, one event shape. Each form plugin fires its submissions differently, so a site running more than one ends up with a different tag, a different trigger, and a different set of field names for each. This plugin detects whichever form plugins are active and emits a single, consistent form_submit event for all of them, so one tag in Google Tag Manager covers the whole site.
Campaign attribution rides along. UTM parameters and advertising click IDs are captured on the visitor’s first landing and stored for 30 days, so a form submitted a week after the ad click still reports the campaign that produced it.
Supported form plugins
Detection is automatic. No configuration is needed beyond activating the plugin, and nothing is loaded for a form plugin that is not installed.
- Contact Form 7
- Gravity Forms
- Ninja Forms
- Elementor Pro forms
- Avada / Fusion Builder forms
These are third-party products, listed here to describe compatibility. This plugin is not affiliated with, endorsed by, or supported by their makers.
What gets tracked
form_submiton every detected submission, carrying the form type, form ID, and the email address and phone number the visitor enteredgenerate_leadwhen a submission includes a valid email address and the Generate Lead Events setting is on (off by default on new installs)qualify_leadwhen a submission carries an email address, a phone number, and an advertising click IDphone_clickwhen a visitor clicks atel:link, andemail_clickfor amailto:link, except links and numbers you exclude (see the FAQ)- UTM parameters (source, medium, campaign, term, content) on all of the above
- Advertising click IDs:
gclid,gbraid,wbraid,fbclid,msclkid,ttclid,twclid,rdt_cid,li_fat_id,snap_click_id, andpclid
Every event carries cuft_tracked: true, which gives you one reliable condition to build triggers on.
Send it to GA4, Google Ads and Meta
One trigger in Google Tag Manager covers every form on the site, and a form plugin added later needs no new tag:
- Add Data Layer Variables for
cuft_trackedand for the fields you need, such asform_type,form_id,utm_campaign,gclidandlead_id. - Create a Custom Event trigger for
form_submitwith the conditioncuft_trackedequalstrue. - Fire your GA4 event tag, Google Ads conversion tag or Meta Pixel
Leadevent on that trigger. For Google Ads enhanced conversions, mapuser_emailinto a User-Provided Data variable.user_phoneholds the number as the visitor typed it, so convert it to E.164 form (such as+17805550173) before mapping it. For GA4, sendlead_idand leave the contact details out.
Shared lead identity
Each event can carry a lead_id: the SHA-256 hash of the visitor’s email address, lowercased and trimmed, or of their phone number in E.164 form when no email was given. The same hash is computed server-side, so an analytics event and a downstream CRM record derived from the same person produce the same identifier.
The form_submit event also carries the raw email address and phone number. Send lead_id instead of those fields wherever raw personal data must not go; Google Analytics, for one, forbids sending it email addresses or phone numbers.
The normalisation matches what Google Enhanced Conversions and Meta CAPI expect, so the value doubles as a match key for offline conversion imports.
Built to stay out of the way
- No jQuery dependency; the tracking scripts are plain JavaScript
- No third-party CDN requests; every library the plugin needs ships with it
- Framework scripts load only for form plugins that are actually present
- Tracking failures are contained and never block a form submission
Who maintains this
Choice OMG maintains this plugin. We are a digital marketing and web agency in Edmonton, Alberta, and we built it because our clients’ sites run several form plugins at once and each one needed its own analytics plumbing. The plugin’s overview page is Choice Universal Form Tracker for WordPress. If you would rather have GTM, GA4 and Google Ads conversion tracking set up for you, Choice OMG does that for clients.
External services
This plugin can connect to the external services below. Every one of them is off on a new install and stays off until an administrator configures it on the settings screen. With none configured, the plugin only pushes events to the window.dataLayer array in the visitor’s own browser and sends nothing anywhere.
Google Tag Manager
Used when you enter a GTM container ID on the settings screen. Leave that field empty and no request is made; the plugin then pushes events to a dataLayer supplied by your own GTM installation instead.
What is sent: the visitor’s browser requests the container script from https://www.googletagmanager.com/gtm.js (and, for visitors without JavaScript, the ns.html frame). As with any GTM installation, Google receives the request, the visitor’s IP address and browser details, and whatever your own container tags choose to send, which will include the form and campaign data described above if you configure tags to forward it.
When: on every front-end page load, once a container ID is set.
- Service: Google Tag Manager
- Terms of service: https://www.google.com/analytics/terms/tag-manager/
- Privacy policy: https://policies.google.com/privacy
Server-side Google Tag Manager (optional custom host)
Used only when you enable server-side GTM and enter your own tagging server hostname. Off by default. The setting accepts a bare hostname only (for example gtm.example.com); the plugin builds the script address itself as https://<host>/gtm.js?id=<container ID>.
What is sent: the container script is requested from the host you entered instead of from Google, so that host receives the same page-load request described above. To decide whether the host is healthy, the plugin also requests gtm.js and ns.html from it, server to server, when you press the test button and on a six-hour schedule, with a recheck 15 minutes after a failed check. Those checks carry the container ID and no visitor data. When the custom host fails two checks in a row, the plugin falls back to www.googletagmanager.com, and returns to the host after three passes in a row.
When: on every front-end page load, and on the six-hour health check, while server-side GTM is enabled.
You choose the host, so you decide who receives the request and which terms apply.
Google Analytics Measurement Protocol
Used only when you supply both a GA4 Measurement ID and an API secret on the settings screen. Without both, no request is made.
What is sent: a server-side event to https://www.google-analytics.com/mp/collect, containing the GA client ID read from the visitor’s _ga cookie, the event name, the configured lead value and currency, and the event parameters for that submission.
When: when a lead’s status is updated through the plugin’s webhook (for example, a lead marked qualified).
- Service: Google Analytics
- Terms of service: https://marketingplatform.google.com/about/analytics/terms/us/
- Privacy policy: https://policies.google.com/privacy
Click collector (optional custom host)
Used only when you enter a Click Collector Host on the settings screen. Empty by default, in which case nothing is sent.
What is sent: the visitor’s browser sends a POST (navigator.sendBeacon) to https://<the host you entered>/p carrying the advertising click ID and its platform, the five UTM parameters, the referring URL, the landing page URL, and the GA client ID from the _ga cookie.
When: on page load, only when a click ID is present in the URL or in the plugin’s own click cookie.
You choose the host. Point it at your own collector, or at the one Choice OMG operates for its clients, in which case Choice OMG receives the data above under the terms and privacy policy linked in the next section.
Choice OMG phone validation service
Used only when an administrator switches phone validation on and registers the site with a registration secret that Choice OMG issues to its clients. Both are off and empty by default, so this service is never contacted on a standard install.
What is sent: registering the site (the Register Site button) sends the site’s domain name and the registration secret to https://phone-validator.choice.zone. After that, each phone number to be checked is sent from your server to https://phone-validator.choice.zone/validate-phone together with the site’s registration token. Choice OMG’s service looks the number up with its own providers and returns whether the number is valid, its line type, and a quality score. The plugin itself never contacts those providers.
When: when a submitted phone number is validated. Results are cached on your site for 24 hours per number, so a repeated number is not sent again within that window.
- Service: Choice OMG
- Terms of service: https://choice.marketing/terms/
- Privacy policy: https://choice.marketing/privacy-policy/
Because form submissions can carry personal data, review your own privacy policy and any applicable data-protection obligations (GDPR, CCPA, PIPEDA and similar) before enabling any of these services.