Elementor Forms + Meta Ads Conversion Tracking Setup
I see Elementor Forms setups missing Meta conversion data in about 35% of WordPress accounts I audit. The main culprit? Elementor’s form submission event doesn’t automatically fire standard conversion events that Meta can catch. You need to manually hook into Elementor’s submission events and push them to Meta via both pixel and CAPI.
The good news is Elementor Forms actually has decent hooks for this once you know where to look. Most people try to use generic form submission triggers in GTM and wonder why their conversion counts are off by 60%.
What You’ll Have Working By The End
- Elementor form submissions automatically fire as Meta Lead events
- Server-side conversion tracking via Meta CAPI with proper deduplication
- Lead events showing in Meta Events Manager within minutes of form submission
- Accurate conversion attribution data in Meta Ads Manager
- Backup client-side pixel tracking for iOS 14.5+ scenarios
Prerequisites
- Elementor Pro plugin installed and active
- Google Tag Manager container installed on your WordPress site
- Meta Business Manager access with Events Manager permissions
- Meta Pixel already installed (via GTM or plugin)
- Access to your WordPress admin panel for webhook configuration
- Meta Conversions API access token configured
Step 1: Set Up the Elementor Form Event Listener
First, you need to catch Elementor’s form submission event and push it to the data layer. Add this JavaScript to your WordPress site via your theme’s functions.php or a code snippets plugin:
jQuery(document).ready(function($) {
// Listen for Elementor form submissions
$(document).on('submit_success', '.elementor-form', function(event, response) {
const form = $(this);
const formName = form.find('.elementor-form-fields-wrapper').closest('.elementor-widget-form').find('.elementor-widget-container').attr('data-widget_type') || 'elementor_form';
// Get form field values
const formData = {};
form.find('input, select, textarea').each(function() {
const field = $(this);
const fieldName = field.attr('name');
if (fieldName && field.val()) {
formData[fieldName] = field.val();
}
});
// Push to data layer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'elementor_form_submit',
form_name: formName,
form_id: form.find('form').attr('id') || 'unknown',
form_data: formData,
user_email: formData.email || '',
user_phone: formData.phone || formData.phone_number || ''
});
console.log('Elementor form submitted:', formData);
});
});
If you’re using a custom theme or need more control, you can also hook directly into Elementor’s PHP action:
add_action('elementor_pro/forms/new_record', function($record, $handler) {
$form_name = $record->get_form_settings('form_name');
$fields = $record->get('fields');
// Output JavaScript to fire GTM event
echo "<script>
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'elementor_form_submit',
form_name: '" . esc_js($form_name) . "',
form_data: " . json_encode($fields) . "
});
</script>";
}, 10, 2);
I prefer the JavaScript approach because it’s more reliable across different Elementor versions and doesn’t depend on PHP hooks that might get overridden.
Step 2: Create GTM Trigger for Elementor Forms
In Google Tag Manager, create a Custom Event trigger:
- Go to Triggers → New
- Choose Custom Event
- Event name:
elementor_form_submit - This trigger fires on: All Custom Events
- Name it “Elementor Form Submission”
Create these GTM variables to capture the form data:
Form Name Variable:
- Variable Type: Data Layer Variable
- Data Layer Variable Name:
form_name - Name: “DLV - Form Name”
User Email Variable:
- Variable Type: Data Layer Variable
- Data Layer Variable Name:
user_email - Name: “DLV - User Email”
User Phone Variable:
- Variable Type: Data Layer Variable
- Data Layer Variable Name:
user_phone - Name: “DLV - User Phone”
Step 3: Configure Meta Pixel Lead Event Tag
Create a new Meta Pixel tag in GTM:
-
Tag Type: Meta Pixel
-
Event Type: Track Event
-
Event Name: Lead
-
Event Parameters:
content_name: {{DLV - Form Name}} content_category: lead_form value: 1 currency: USD -
Trigger: Elementor Form Submission
-
Advanced Settings → Event ID: Use this custom JavaScript variable:
function() {
return 'elementor_' + {{DLV - Form Name}} + '_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
}
This event ID is crucial for deduplicating events between client-side pixel and server-side CAPI.
Step 4: Set Up Meta CAPI Integration
Here’s where most people fumble. You need server-side tracking via Meta’s Conversions API to get around iOS 14.5+ tracking limitations. I recommend using a WordPress plugin like “Conversions API for WordPress” or setting up a custom webhook.
Option A: Using Official Meta CAPI Plugin
- Install the “Meta for WordPress” plugin
- Connect your Facebook Business account
- Go to Meta → Settings → Conversions API
- Enable “Automatic Advanced Matching”
- Add this filter to your theme’s functions.php:
add_filter('facebook_for_woocommerce_integration_aam_fields', function($fields) {
// Add Elementor form data to CAPI events
if (isset($_POST['elementor_form_submit'])) {
$form_data = $_POST['form_data'];
$fields['em'] = !empty($form_data['email']) ? hash('sha256', strtolower(trim($form_data['email']))) : '';
$fields['ph'] = !empty($form_data['phone']) ? hash('sha256', preg_replace('/[^0-9]/', '', $form_data['phone'])) : '';
}
return $fields;
});
Option B: Custom CAPI Webhook
Set up a webhook endpoint that receives Elementor form submissions and sends them to Meta CAPI:
function send_elementor_form_to_meta_capi($record, $handler) {
$fields = $record->get('fields');
$form_settings = $record->get_form_settings();
$event_data = [
'event_name' => 'Lead',
'event_time' => time(),
'action_source' => 'website',
'event_source_url' => get_permalink(),
'event_id' => 'elementor_' . $form_settings['form_name'] . '_' . time() . '_' . wp_rand(1000, 9999),
'user_data' => [
'em' => !empty($fields['email']) ? hash('sha256', strtolower(trim($fields['email']))) : '',
'ph' => !empty($fields['phone']) ? hash('sha256', preg_replace('/[^0-9]/', '', $fields['phone'])) : '',
'client_ip_address' => $_SERVER['REMOTE_ADDR'],
'client_user_agent' => $_SERVER['HTTP_USER_AGENT']
],
'custom_data' => [
'content_name' => $form_settings['form_name'],
'content_category' => 'lead_form',
'value' => 1,
'currency' => 'USD'
]
];
// Send to Meta CAPI
$response = wp_remote_post('https://graph.facebook.com/v18.0/' . FACEBOOK_PIXEL_ID . '/events', [
'body' => json_encode([
'data' => [$event_data],
'access_token' => FACEBOOK_ACCESS_TOKEN
]),
'headers' => ['Content-Type' => 'application/json']
]);
}
add_action('elementor_pro/forms/new_record', 'send_elementor_form_to_meta_capi', 10, 2);
Replace FACEBOOK_PIXEL_ID and FACEBOOK_ACCESS_TOKEN with your actual credentials.
Step 5: Configure Elementor Form Actions
In your Elementor form settings, you might want to add additional actions:
- Edit your Elementor form
- Go to Actions After Submit
- Add Webhook action (optional, for backup tracking)
- URL: Your CAPI endpoint
- Add Redirect action if needed (this won’t interfere with tracking)
The key is ensuring your form submission event fires before any redirect happens. The JavaScript listener we set up in Step 1 handles this correctly.
Testing & Verification
Test in GTM Preview Mode:
- Enable GTM Preview mode
- Submit your Elementor form
- Check that
elementor_form_submitevent fires - Verify your Meta Pixel Lead event tag triggers
- Check that form data variables populate correctly
Verify in Meta Events Manager:
- Go to Events Manager → Test Events
- Enter your website URL
- Submit the form
- Look for Lead events in the test events feed
- Should see both browser and server events (if CAPI is working)
Cross-Check Conversion Counts:
Check your numbers weekly:
- Elementor Forms entries: WordPress Admin → Elementor → Submissions
- Meta Lead events: Events Manager → Data Sources → [Your Pixel] → Activity
- Acceptable variance: 5-15% (higher variance usually indicates iOS blocking or CAPI issues)
Debug Meta CAPI:
Use Meta’s Events Manager Diagnostics tab to check CAPI integration:
- Server events should show “Conversions API” as the connection method
- Event deduplication should be working (no duplicate events with same event_id)
- User data should be hashed properly (SHA-256)
Troubleshooting
Problem: GTM trigger not firing when form is submitted
Solution: Check that the JavaScript event listener is loaded after Elementor’s scripts. Add jQuery(document).ready() wrapper and ensure it’s placed in footer, not header. Also verify the form selector - some custom Elementor themes modify the form classes.
Problem: Meta showing duplicate conversion events
Solution: Event deduplication isn’t working. Make sure your client-side pixel and CAPI events use the exact same event_id. Check the Events Manager Diagnostics tab for deduplication status. The event ID must be identical between both tracking methods.
Problem: CAPI events not appearing in Events Manager
Solution: Check your access token permissions and pixel ID. The token needs ads_management and business_management permissions. Test your CAPI endpoint directly with curl to isolate WordPress-specific issues. Also verify SSL certificates on your server.
Problem: Form data not passing to Meta events Solution: Elementor field names might not match your data layer variables. Check the browser console for the data layer push and verify field names. Some Elementor forms use custom field IDs instead of standard names like ‘email’ and ‘phone’.
Problem: Conversion attribution showing as “Direct” instead of Meta ads Solution: This usually indicates the Meta pixel isn’t loading before form submission, or users are blocking client-side tracking. Ensure your pixel loads in the page header, not footer. CAPI helps here but won’t fix attribution for blocked pixel scenarios.
Problem: iOS users not tracking properly Solution: iOS 14.5+ blocks most client-side tracking. This is exactly why you need CAPI working properly. Check that your CAPI events include proper user data (hashed email/phone) and that Advanced Matching is enabled. Consider using Meta’s Offline Conversions API as a backup for high-value leads.
What To Do Next
Now that your Elementor Forms are tracking in Meta Ads, consider these related setups:
- Elementor Forms + Google Ads conversion tracking - Track the same leads in Google Ads
- Elementor Forms + GA4 conversion tracking - Get proper attribution data in GA4
- Elementor Forms to HubSpot integration - Automatically sync leads to your CRM
- Complete Meta Ads conversion tracking guide - Set up tracking for other conversion types
Need help with a complex tracking setup? Get a free tracking audit and I’ll identify what’s broken in your current configuration.
This guide is part of the Meta Ads Conversion Tracking Hub — complete guides for tracking every conversion type in Meta Ads with proper attribution and iOS 14.5+ compliance.