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.
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:
- Mautic Focus Items
- Third Party Forms
- Ecommerce – coming soon
- Advanced Tracking – coming soon
- Dynamic Content – coming soon
- Tips & Tricks
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:
- 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.
- 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.
- Additional settings
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.
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.
Copy that code, and paste it wherever you want your form to display in WordPress.
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):
Once you’ve created your Focus Item, you have two options to add it to your site (similar to a Mautic form):
- 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.
Unsure of last update.
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.
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.