Mautic and WordPress: A Guide for Non-Developers

Mautic and WordPress play really nicely together. They’re both free, open source, and incredibly powerful. With Mautic running your marketing and WordPress handling your website, you’re set up for success that can scale – without costing a fortune.

This post is divided into several sections, starting with information for beginners, followed by more advanced topics and integrations.

First time integrating with Mautic and WordPress?

If you’re new to Mautic, I’ll show you how to get started by adding your Mautic tracking code to WordPress. We’ll also cover the basics of adding Mautic forms for lead capture.

Start here: Before You Begin and First Steps: Install Tracking and Mautic Forms

Ready to take your Mautic WordPress integration to the next level?

I’ve collected a variety of tutorials, plugins, and other resources for connecting Mautic and WordPress – beyond basic lead forms. We’ll cover:

Want to stay informed about the latest tutorials, news, and plugins for Mautic? Check out my weekly newsletter, The Unofficial Mautic Newsletter.

Before You Begin

If you’re reading this, I’m guessing that you are already familiar with WordPress. But perhaps you’ve only recently discovered Mautic – free, open source marketing automation software.

In this guide, I assume two things:

First, I assume you are familiar with the basics of managing a WordPress site, such as installing plugins, using the visual editor to add short codes and snippets to posts, etc.

Second: you already have Mautic installed with basic settings (don’t forget your cron jobs!) properly configured. If not, I recommend you do that first. Check out the Mautic docs and my favorite Mautic installation guides for starters.

First Steps: Install Tracking and Mautic Forms

To start tracking website visitors, you’ll need to add the Mautic tracking code to all of your pages. There are several ways to do this, but if you’re just getting started, I recommend using WP Mautic, the official Mautic WordPress plugin.

Note: you can also download the plugin from Mautic WordPress GitHub.

Here’s a quick how-to video:

  1. Install and activate WP Mautic
    Installing the plugin via your WordPress dashboard is easy. In WordPress, go to Plugins > Add New and search for ‘WP Mautic’. Install and activate the WP Mautic plugin.
  2. Add your Mautic site URL
    In the plugin settings, you need to add the site URL (sometimes referred to as your “base URL”) from your Mautic installation. To get this URL, go to your Mautic dashboard and choose Settings > Configuration. You should now be in System Settings, looking at a your General Settings. Copy your Site URL and add it to your plugin settings in WordPress. Make sure you save your changes.
  3. Additional settings
    I also recommend choosing the option to embed the script in the ‘wp_footer’ section, and checking the box to activate the tracking image when Javascript is disabled. I’ll cover the “Logged user” option later in this post.

With the plugin active and your site URL saved in settings, your Mautic tracking code will now automatically be inserted on every page of your site. Nice!

Adding Mautic Forms to Your Site

With site tracking enabled, now it’s time to integrate your Mautic forms with WordPress so you can start collecting leads.

If you haven’t created any Mautic forms yet, I recommend reviewing the forms documentation. You might also want to check out this video that explains the differences between standalone and campaign forms.

To add your Mautic form to WordPress, you have several options:

Option 1: Use a shortcode.

If you’re using the WP Mautic plugin, you can use this shortcode to embed a form in any WordPress page or post:

[mautic type="form" id="3"]

Make sure you change the ID number so that it matches the ID of your Mautic form, the one you want to embed. The number 3 above is just an example.

Getting the Mautic form ID

Option 2: The Mautic embed code.

Automatic embed: From your Mautic dashboard, click on the name of the form you want to embed. Look for the teal colored box titled “Form HTML”, where you can choose either automatic or manual embed.

I suggest starting with “automatic”, and using the Javascript code, which you’ll notice is the recommended option. Why? Because any changes you make to your form in Mautic will be automatically reflected on your site, wherever the form is embedded.

Copy that code, and paste it wherever you want your form to display in WordPress.

Manual copy embed: If the area you want to embed your form does not allow Javascript, you can try the second option – the “manual copy” iframe code.

With this method, the form is constrained to a 300px square area by default. If your form is not displaying properly, you may need to adjust those values!

Using this method, any changes you make to Mautic will not be reflected on your site. You will need to re-add the iframe code any time you make a change.

Mautic Focus Items

Besides your standard form embeds, Mautic makes it pretty easy to create popups and other types of opt-ins to collect visitor data.

In Mautic, a Focus Item is used to engage your visitors – either by displaying a notice, asking them to opt-in, or encouraging them to click on a button or link.

Popups, display bars, and full-page takeovers are all at your disposal. Check out the docs for more info.

Creating a Popup to Collect Email Addresses

Ready to create a popup? I recommend starting with this video (opens in a new tab):

How To Create A Focus Item On Your Website

Once you’ve created your Focus Item, you have two options to add it to your site (similar to a Mautic form):

  1. You can embed it with the Javascript snippet that Mautic provides.
  2. Use a shortcode (if you’re using the WP Mautic plugin):
[mautic type="focus" id="1"]

Don’t forget to change the ID number. It should match the ID of the Mautic focus item you want to use.

Third Party Forms for WordPress and Mautic

If you’re already using a form plugin in WordPressw to capture leads (and don’t want to switch to embedded Mautic forms), you have a few options to integrate with Mautic.

Warning: some plugins mentioned below are old. Test and use with caution!

WordPress Form Plugins for Mautic

WP Mautic Form Integrator
Try this plugin if you’re using Contact Form 7, Fast Secure Forms, Ninja Forms, Formidable Forms, or Gravity Forms.

WP Fusion Lite
Syncs WordPress users – see Sync WordPress Users with Mautic (The Easy Way). This plugin is actively maintained and works with Mautic 3.

Fluent Forms
Recently updated.

Gravity Forms
Unsure of last update.

Ninja Forms
Has not been updated in several years.

For other (non-form) types of WordPress plugins for Mautic, visit the WordPress section of my plugins page.

Other Options

Depending on the software you’re using, you can always try Zapier or Integromat.

Tips & Tricks for Mautic and WordPress

Helpful articles published Mautic community members.

Sync WordPress Users with Mautic (The Easy Way)
Learn how to automatically create new contacts in Mautic (with tags!) every time a user registers in WordPress. Great for membership sites.

Tracking Known WordPress Users in Mautic with the Official Mautic Plugin

How to Send Custom Attributes with the Official Mautic WordPress Plugin

Mautic Form Layout For WordPress