Elementor

Elementor Form Integrations: Webhooks, CRM Handoff and Conversions

Elementor form integrations are the server-side handoff between an Elementor Pro Form submission and the system that receives it: a webhook, a CRM, or a conversion tag. In my builds the rule is simple — a form only counts when the backend confirms success. I validate on the server, filter spam before handoff, and fire conversions after a verified 2xx response, never on button click.

By Saif Al Jahanwebdev-saif.com

What an Elementor form integration has to do

An Elementor form is a UI, not a data pipeline. The Form widget collects fields and runs its own actions — Email, Webhook, Redirect — but none of them guarantee that a lead reached your CRM or that a conversion tag fired legitimately. An integration is the layer that makes that guarantee: capture the submitted values, validate them again on the server, discard bots, deliver the record to the destination, and only then tell the ad platform. I treat one submission as one transaction with a single owner. When two actions try to own the same submission — for example the native Webhook action and a PHP hook — you get duplicate leads and inflated conversion counts, which is exactly the kind of noise that makes attribution useless.

  • One submission, one owner — native Webhook action or a PHP hook, never both
  • Server-side validation after Elementor client validation
  • Spam filtering before any external request is sent
  • A confirmed 2xx response before a conversion is recorded
  • A stable submission ID for deduplication and debugging

The hook I use: elementor_pro/forms/new_record

Elementor Pro fires the elementor_pro/forms/new_record action after the form passes its built-in validation. It receives two arguments: the Form_Record object and the Ajax_Handler. That timing matters — it is early enough to stop the submission and late enough to trust the field values. I read fields with $record->get_form_fields() or $record->get_field_by_id( 'email' ), using the field custom ID rather than its label, because labels change during design tweaks. To reject a submission I call $ajax_handler->add_error( 'email', 'Enter a valid work email.' ); Elementor returns that error to the form and stops the remaining actions. I keep this code in a small mu-plugin so a theme switch cannot silently remove the integration.

  • Hook: add_action( 'elementor_pro/forms/new_record', $callback, 10, 2 )
  • Read values: $record->get_form_fields(), $record->get_field_by_id( 'email' )
  • Reject cleanly: $ajax_handler->add_error( 'email', $message )
  • Use field custom IDs, never visible labels, as keys

Webhook versus a custom PHP endpoint

Elementor's native Webhook action POSTs the form payload to a URL you paste into the widget settings. It is fine for a quick Zapier or Make handoff, but you cannot set custom auth headers, and it fires before your own validation has run. For anything that touches a CRM I prefer my own REST route registered with register_rest_route(), called from the new_record hook. There I control the headers, add an HMAC signature with hash_hmac( 'sha256', $payload, $secret ), set a 10-second timeout on wp_remote_post(), and inspect the status code. I also store the raw response in a log for debugging. One rule: pick a single delivery path. Running both the native Webhook action and a PHP endpoint is the most common cause of duplicate leads.

  • Native Webhook action: fast, no custom headers, no response handling
  • Custom endpoint: HMAC header, timeouts, retries, response logging
  • Sign payloads with hash_hmac( 'sha256', $body, $shared_secret )
  • Set the wp_remote_post timeout to 10 seconds, never the default 5

CRM handoff without duplicates

CRMs are forgiving about extra fields and unforgiving about the same record arriving twice. I generate a submission ID with wp_generate_uuid4() and send it as an idempotency key in both a request header and the payload, so the receiving endpoint can deduplicate. Field mapping is explicit: I convert Elementor field IDs to the CRM API names in one array, meaning a renamed field breaks in one place rather than silently writing null. I trim and sanitize every value with sanitize_text_field() and is_email() before transport. If the CRM returns 429 or a 5xx, I schedule a retry with wp_schedule_single_event() rather than hammering it inline. Success means a 2xx plus a response body containing the expected record ID — a 200 with an error object is not success.

  • wp_generate_uuid4() as a stable idempotency key
  • One explicit field-map array, no dynamic guessing
  • Retry 429 and 5xx via wp_schedule_single_event(), not inline loops
  • Confirm success by status code and response body, not status alone

Validation and spam control that holds up

Client-side validation in Elementor is a convenience, not a defence. I repeat the essentials in PHP: required fields non-empty, is_email() on email, sanitize_text_field() on text, and a hard length cap on every input. For spam I combine three cheap checks. First, Elementor's reCAPTCHA v3 with a score threshold around 0.5 — below that, reject with $ajax_handler->add_error(). Second, a honeypot: a hidden input named something like contact_website, hidden with CSS, that real visitors never fill; any value means bot. Third, a rate limit of three submissions per ten minutes per IP, stored in a transient keyed by a hash of the IP. I also reject forms submitted less than three seconds after render using a timestamp field. None of this needs a paid plugin.

  • is_email() and sanitize_text_field() on every submitted value
  • reCAPTCHA v3 score threshold 0.5, enforced server-side
  • CSS-hidden honeypot field; any value rejects the submission
  • Transient rate limit: 3 submissions per 10 minutes per IP
  • Timestamp check: reject submissions under 3 seconds

Fire conversions only on confirmed success

The most expensive mistake is firing a Google Ads or Meta conversion on the submit button click. That records failures, bots and abandoned forms as wins, and it trains the bidding algorithm on garbage. I capture gclid, fbclid and utm_* values into Elementor hidden fields on render — populated from the URL and first-party cookies, never from a third-party script at submit time — and include them in the CRM payload. The conversion fires only after my endpoint confirms the CRM accepted the record with a 2xx and a valid record ID. For Meta I send that through the Conversions API server-side; for Google Ads I use an offline conversion import, or gtag only after the confirmed AJAX response.

  • Never fire on click or on the Elementor submit event
  • Capture gclid, fbclid and utm_* into hidden fields on render
  • Fire after 2xx plus a valid record ID in the response
  • Meta: Conversions API server-side; Google Ads: offline conversion import
  • Log the conversion event ID beside the submission UUID for reconciliation

What I check before I call it done

An integration is not finished because it worked once in my browser. I test the unhappy paths deliberately: invalid email, honeypot filled, reCAPTCHA score forced low, CRM returning 429, and a timeout. Each must produce a clear inline error and zero conversion events. Then I submit from a clean browser and confirm exactly one CRM record, one webhook call, and one conversion in the ad platform diagnostics. I check the logs for the shared submission UUID across all three systems; if the IDs do not line up, attribution will not either. For accessibility I verify that Elementor error messages are announced and that focus returns to the first invalid field. Finally I hand over a one-page map of field IDs, endpoints and secrets.

  • Invalid, spam, 429 and timeout paths all tested
  • Exactly one CRM record, one webhook call, one conversion
  • The same submission UUID visible in all three systems
  • Errors announced to screen readers; focus returns to the first bad field

Frequently asked questions

Should I use Elementor's Webhook action or a custom PHP endpoint?

Use the native Webhook action for simple, low-risk forwarding where you do not need custom headers or response handling. Use a custom PHP endpoint when the data reaches a CRM or triggers billing, because you need HMAC signing, timeouts, retries and a response check. In my builds anything that affects conversion tracking goes through the custom endpoint. Never run both for the same form.

When should a conversion tag fire on an Elementor form?

Only after the submission is confirmed. That means the server accepted the record, returned a 2xx status, and included the expected record ID. Firing on the button click or on Elementor's submit event counts bots, validation failures and abandoned forms as conversions, which corrupts bidding signals. I capture gclid and fbclid into hidden fields on render, then fire through the Conversions API or an offline conversion import after confirmation.

How do I stop Elementor form spam without a paid plugin?

Combine three free checks: Elementor's reCAPTCHA v3 with a server-side score threshold around 0.5, a CSS-hidden honeypot field that must stay empty, and a transient-based rate limit of about three submissions per ten minutes per IP. Add a timestamp field and reject forms completed in under three seconds. Do all of it in the new_record hook so a bot cannot skip the client-side layer.

Why am I getting duplicate leads from my Elementor form?

Usually two systems own the same submission. The common case is leaving Elementor native Webhook action enabled while also sending the same record from a PHP hook, or a CRM automation that creates a contact on every webhook call. Pick one delivery path, generate a submission UUID, and pass it as an idempotency key so the receiver can deduplicate. Log the UUID on both sides.

Where do I put custom Elementor form code?

In a small mu-plugin or a minimal custom plugin, not in functions.php of a theme you plan to change. A mu-plugin loads regardless of the active theme and cannot be edited from the WordPress admin, which reduces the chance of accidental removal. Keep the field map, webhook secret and endpoint URL in one config array so the integration is easy to audit and hand over.

Written by Saif Al Jahan, webdev-saif.com · Mymensingh, Bangladesh. Last updated .