WP Manifestindependent plugin directory
manifest / forms / mautic-cf7

Mautic CF7

Connect your Contact Form 7 forms to Mautic for free. Adds a "Mautic" panel to the CF7 form editor and forwards every submission — along with UTM parameters and visitor IP — to your Mautic instance.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/lpecanha/mautic-cf7/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Free WordPress plugin that integrates Contact Form 7 with Mautic.

Every time a CF7 form is submitted, this plugin replicates the data — along with UTM parameters, visitor IP and the Mautic form ID — to the /form/submit endpoint of your Mautic instance. No external APIs, no license keys, no signup.


Why use it

  • Zero cost. No monthly fees, no submission limits.
  • No Elementor dependency. Works with Contact Form 7, which is lightweight and free.
  • Per-form configuration. Each CF7 form can point to a different Mautic instance / Form ID.
  • Native UTM support. The parameters utm_source, utm_medium, utm_campaign, utm_content and utm_term are forwarded automatically when they exist as form fields.
  • Doesn't block the visitor. If Mautic is slow or unreachable, the CF7 form still completes the submission flow normally.

Requirements

Component Minimum version
WordPress 5.0
PHP 7.3
Contact Form 7 5.0
Mautic 7.1

Installation

Option 1 — Download the ZIP

  1. Download this repository as a ZIP: Code → Download ZIP.
  2. Rename the file to mautic-cf7.zip.
  3. In WordPress, go to Plugins → Add New → Upload Plugin and select the ZIP.
  4. Activate the plugin.

Option 2 — Via FTP / SSH

cd wp-content/plugins
git clone https://github.com/LPecanha/mautic-cf7.git

Then activate it under Plugins → Installed Plugins.


Configuration

1. Create the form in Mautic

In Mautic, go to Components → Forms → New and create a form (Campaign Form or Standalone). Write down:

  • The ID of the form (visible in the URL: /s/forms/view/42 → ID is 42).
  • The alias of every field (under the Fields tab, click a field → the alias is the technical name, e.g. email, first_name).

2. Build the matching form in Contact Form 7

The name of each CF7 tag must exactly match the Mautic alias. Example:

<label> First name
  [text* first_name] </label>

<label> E-mail
  [email* email] </label>

<label> Phone
  [tel phone] </label>

[submit "Send"]

⚠️ If the alias in Mautic is first_name, the CF7 tag must be [text* first_name] — not [text* name].

3. Connect the form to Mautic

In the CF7 form editor, click the Mautic tab (added by this plugin):

Field What to fill in
Mautic Form URL Base URL of your Mautic instance (e.g. https://mautic.yourcompany.com). Do not include /s/ at the end.
Mautic Form ID Numeric ID of the Mautic form (e.g. 42).

Save the form. That's it — every submission from this CF7 form will land in Mautic.


Forwarding UTMs

If you run campaigns with UTM parameters (Google Ads, Facebook, email marketing, etc.), add hidden fields to your CF7 form and populate them via JavaScript from the URL query string:

[hidden utm_source]
[hidden utm_medium]
[hidden utm_campaign]
[hidden utm_content]
[hidden utm_term]

The parameters are automatically appended to the Mautic call whenever they're present.

To populate hidden fields from the URL, you can use the Contact Form 7 Dynamic Text Extension plugin or a small JS snippet.


How it works under the hood

  1. You activate the plugin → it adds a Mautic panel to the CF7 editor (via the wpcf7_editor_panels filter).
  2. You fill in URL + Form ID → both are saved as post_meta on the CF7 form (_mautic_cf7_url and _mautic_cf7_form_id).
  3. A visitor submits the form → CF7 validates it and fires the wpcf7_before_send_mail action.
  4. The plugin listens for that action, reads the fields via WPCF7_Submission::get_posted_data() and sends a POST request to:
{mautic_url}/form/submit?formId={id}&utm_source=...&utm_medium=...

Request body:

[
    'mauticform' => [
        'formId'     => '42',
        'first_name' => 'John',
        'email'      => 'john@example.com',
        // ... remaining fields
    ]
]

The Client-Ip and X-Forwarded-For headers are sent with the visitor's IP so Mautic can preserve geolocation tracking.


Troubleshooting

Submissions are not showing up in Mautic.

  • Check that the Form ID really corresponds to the Mautic form you're looking at.
  • Confirm the Mautic URL is correct and reachable from the public internet (it can't be localhost if WordPress lives on a different server).
  • Open {mautic_url}/form/submit?formId=X directly in your browser — it should return the Mautic form page. If you get a 404, the form doesn't exist or is unpublished.

Submissions arrive but fields are empty.

  • The name of each CF7 tag must match the alias of the Mautic field — not the visible "label".
  • Watch out for uppercase/lowercase and hyphens vs. underscores.

The CF7 form spins for a while before showing the success message.

  • This means Mautic is slow or unreachable. Check the network latency between WordPress and Mautic.
  • By default the call to Mautic is synchronous (waits for a response). If you want to decouple it, edit includes/integrations/Mautic_CF7_Integration.php and add 'blocking' => false and 'timeout' => 4 to the arguments of wp_remote_post().

Message "Mautic CF7 requires Contact Form 7 installed and active".

  • Install and activate Contact Form 7. The plugin only works with it.

Security

  • The admin panel uses a nonce (mautic_cf7_save_settings) to protect against CSRF.
  • All admin outputs are escaped (esc_attr, esc_html__).
  • Inputs are sanitized with esc_url_raw and sanitize_text_field before update_post_meta.
  • The plugin does not store submission data locally — it just forwards it to Mautic.

License

GPLv3


Author

Built by Lucas Peçanha.

Issues, feature requests and PRs are welcome: github.com/LPecanha/mautic-cf7/issues.