X (Twitter) Pixel WPForms Submission Event Tracking for WordPress
Quick answer: Select X (Twitter) Pixel and the WPForms Submission event in the free container builder wizard, enter your tracking ID, then import the generated file into Google Tag Manager - the trigger is wired up automatically, no manual setup required.
Configure the WPForms Submission event so X (Twitter) Pixel fires correctly on your WordPress store, then generate an importable Google Tag Manager container - no manual tag, trigger, or variable setup required.
Generate my X (Twitter) Pixel WPForms Submission container →
How it works
- Open the container builder with X (Twitter) Pixel and the WPForms Submission event already selected.
- Enter your tracking ID/pixel credentials for this platform.
- Generate and download the GTM container JSON file.
- In Google Tag Manager: Admin > Import Container > choose the file > Merge into a new workspace, then verify in Preview mode before publishing.
Track WPForms Submission with other platforms
- Track WPForms Submission with Google Analytics 4
- Track WPForms Submission with Google Ads
- Track WPForms Submission with Meta Pixel
- Track WPForms Submission with TikTok Pixel
- Track WPForms Submission with Pinterest Tag
- Track WPForms Submission with LinkedIn Insight Tag
- Track WPForms Submission with Microsoft Advertising (UET)
How this event is built in your container
WPForms Submission is detected automatically. WPForms triggers its own wpformsAjaxSubmitSuccess jQuery event on the document right after a successful AJAX submission.
This container includes a small Custom HTML tag, firing on All Pages, that listens for that native event and pushes dataLayer.push({ event: 'wpforms_submission', ... }) itself - unlike this plugin's other events, there's no code for you to add manually.
For this to work, though:
- The form must submit via AJAX (WPForms' default) rather than a classic page-reload submission.
- jQuery must be present on the page - WPForms already requires and loads it on any page containing one of its forms, so this is rarely the issue unless something else on the page removes it.
For reference, here is the exact script this container's bridge tag runs:
(function(){
if (window.__gtmcbWpformsBridge) { return; }
window.__gtmcbWpformsBridge = true;
function bindListener() {
if (typeof jQuery === 'undefined') { return; }
jQuery(document).on('wpformsAjaxSubmitSuccess', function (event, formData) {
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'wpforms_submission',
wpforms_form_id: (formData && formData.id) || ''
});
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', bindListener);
} else {
bindListener();
}
})();The X (Twitter) Pixel tag itself is added automatically and wired to this trigger - you won't need to create or configure it by hand in GTM.
Troubleshooting
The event never fires.
Check whether the form is using AJAX submission - if the page reloads on submit, the JS event never gets a chance to fire. This is controlled per-form under the form's settings in WPForms.
wpforms_form_id comes through blank.
Some page builders, caching setups, or script-deferral plugins can delay or strip jQuery. Open the browser console on the page with the form and confirm typeof jQuery !== 'undefined'.
The event fires, but values show up blank or undefined.
Check that the pushed object's key names match exactly (case-sensitive) - a mismatched key like "Value" instead of "value" will show as undefined in GTM's variable preview.
WPForms Submission fires twice for the same action.
You likely also have a manually-added X (Twitter) Pixel snippet listening for the same action alongside this container's own bridge tag. Remove the manual one, or disable it, before publishing.
Frequently asked questions
What triggers the WPForms Submission event?
It's detected automatically - WPForms triggers its own wpformsAjaxSubmitSuccess jQuery event on the document right after a successful AJAX submission.. This container includes a ready-made bridge tag for it, so there's nothing to configure manually.
Why should I track WPForms Submission with X (Twitter) Pixel specifically?
It shows engagement further up the funnel, which X (Twitter) Pixel can use to build audiences and understand what leads to a purchase, even before the sale happens.
Is this free to set up?
Yes - the free tier covers 1 tracking platform at a time. If you need this event across several platforms in one container, unlocking full access covers all of them together.
Will this conflict with X (Twitter) Pixel code I already added manually?
It can, if the same event fires twice from two separate sources. Remove any manually-added X (Twitter) Pixel tag for this event before importing the generated container, or use GTM's Preview mode to confirm it only fires once.
How long does setup take?
A few minutes - select X (Twitter) Pixel and the WPForms Submission event in the wizard, enter your tracking ID, download the container, and import it into GTM.
Do I need to add any code to my site for WPForms Submission?
No. Unlike most events in this wizard, this one ships its own small Custom HTML tag inside the container itself that detects the submission and pushes it to the dataLayer - there's no snippet to paste into your theme or a code snippets plugin.
Are there any conditions for this to actually work?
The form must submit via AJAX (WPForms' default) rather than a classic page-reload submission. jQuery must be present on the page - WPForms already requires and loads it on any page containing one of its forms, so this is rarely the issue unless something else on the page removes it.