Webhook for WordPress Elementor Pro Form & Mautic

Hello community, I am using WordPress + Elementor Pro on one of my websites.

Unfortunately, Elementor Pro Form & Pop-up are NOT natively integrated with Mautic, but it provides a Webhook option.

I already have a couple of Popup plugins that work fine with Mautic BUT I don’t want to add unnecessary plugins as long as I can use Elementor’s in-built features.

Zapier is another option but again, I wish to use the in-built features.

Anyone who can help with Elementor Pro Form + Mautic integration using Webhooks?

Thanks!

3 Likes

I have been dreaming of this for some time. I have tried to connect Zapier, but cannot for the life of me or my techie get it to work.

1 Like

@malik @lindsayab @xcouter

You guys are going to love this. Gabriel Carvalho released (and maintains?) this plugin for Wordpress called Elementic. Note that this is a plugin for WP, not a plugin for Mautic.

If you’re like me and have zero Portuguese language skill, that’s OK, here’s the one key detail you need to know, which he explains at 5:30 in his explainer video:

Just make sure the “Field HTML name” in the field Attributes in the Mautic form builder exactly matches the “ID” of the respective form field in Elementor. “Field HTML name” in Mautic = “ID” in the Elementor form field.

Enjoy!

PS - we also use the webhook feature in Elementor forms, in addition to the Elementic plugin, to trigger other automations (like splitting a fullname string into first/last, then updating Mautic contact :sunglasses:).

EP

3 Likes

Awesome! thanks for the update @entrepositive.

I will install, test & update the results here soon.

1 Like

I assume this won’t drop the mautic trackig cookie like a native mautic form would?

You would have to rely on a DOI link click for that right?

That’s a bit over my head. Here’s the JSON from the webhook:

[
  {
    "headers": {
      "host": "127.0.0.1:5678",
      "user-agent": "WordPress/6.0.3; [wordpress site]",
      "accept": "*/*",
      "accept-encoding": "deflate, gzip",
      "referer": "[webhook URL]",
      "content-type": "application/x-www-form-urlencoded",
      "x-forwarded-for": "[some ip]",
      "x-forwarded-host": "[webhook server],
      "x-forwarded-server": "[webhook server]",
      "content-length": "123",
      "connection": "close"
    },
    "params": {},
    "query": {},
    "body": {
      "Name": "Fake Name",
      "Email": "fakename@example.com",
      "GDPR": "Yes",
      "form_id": "q3vfg52",
      "form_name": "My Form"
    }
  }
]

Within Mautic, it creates a new contact, as expected, with correct form data and IP address.

EP

Thanks, I will do some testing to see if this fires off tracking or not. I suspect not, its only passing over the captured information.

1 Like

Where you able to resolve this?

This script is not reading out the Mautic cookie and not passing the information.
Therefore there is no way it tracks the person who filled it out.

1 Like

Thank you.
Do you think this is something that can be resolved?

When Mautic is installed on the same server as the website and uses the elementic plugin, it can perfectly track user data, but when we separate them from the server, I really couldn’t find a way for Mautic to recognize the client’s Roto IP since the JSON header arrives in X-Forwarded-x with the server’s IP and not with the user’s Remote IP. If anyone has an idea on how to make the header go to Mautic with the remote IP in the x-Forwarded-x field instead of the server’s IP it would help a lot.

1 Like

Good thinking.

I wonder also if there is a way to pass key data (eg. from the cookie) with the form data.

Mautic will still use the email from the submitted form data to match existing contacts. We also use a 3rd party tool to receive webhook data, whereupon we can retroactively modify contact data in Mautic if need be.

For our use case, we are not lacking any data here. If an existing contact fills a form, the data sent to Mautic is associated correctly with that Contact. (Note: an identical form must also be created in Mautic for the Elementic plugin to work; and we also use the WP plugin WP Fusion, which may also sync data in the background.) If/when we open the WP site for user login, we can also pass along WP user ID as hidden element in the form data sent to Mautic.

I’d be interested to hear from @robm and @joeyk any thoughts you might have on this.

EP