Connecting Mautic to WordPress with the WP Mautic plugin

The WP Mautic plugin embeds Mautic forms and tracking into a WordPress site without custom theme code. This page covers the requirements, configuration sequence, data sent and the checks that confirm it works.

On this page

Connecting Mautic to WordPress with the WP Mautic plugin: what it does

If your marketing team runs Mautic and wants its forms and visitor tracking on a WordPress site, the WP Mautic plugin is the connector to use. It embeds Mautic forms and assets through shortcodes such as [mautic type="form" id="1"], loads the Mautic tracking script in the header or footer, and requires WordPress 4.6 or later. Confirm that your WordPress version meets that minimum before planning the work, and check the plugin's own documentation for the current compatibility list, since your site's theme and other plugins can affect how the script and shortcodes render.

The plugin connects one WordPress site to a self-hosted Mautic instance that you already run. It does not create that instance, and it does not decide what happens to a visitor after the data arrives. Segments, campaigns, scoring and the forms themselves are designed inside Mautic, so the plugin is only as useful as the contact model behind it. Consent setup is also outside its scope. Before you publish a form, confirm which checkbox or preference wording you need, where the opt-in is recorded in Mautic, and whether your privacy notice covers tracking on every page where the script runs.

The practical question for the team is where the plugin sits in your site's architecture. Because it adds a tracking script to every page it covers and an embedded form wherever a shortcode appears, it changes what runs in visitors' browsers and what data reaches your Mautic server. Decide early which pages should carry tracking, which should carry forms, and who on the marketing and web teams owns each shortcode. Plan testing against the Mautic instance itself, not only the WordPress front end, so you can see the contacts and activity that actually arrive.

What you need before installing the plugin

The WP Mautic plugin connects a WordPress site to a Mautic instance you already run, so the plugin is the last step rather than the first. Four things must be in place on both sides before anyone touches the WordPress admin: a supported WordPress version, a reachable Mautic instance, the form and asset IDs you plan to embed, and a Mautic that meets its own platform requirements.

WordPress version floor

The plugin requires WordPress 4.6 or later. Confirm the version running on each target site, including staging, because a site that sits below the floor will fail before any tracking is added. Check the plugin's own listing and the vendor docs for the current compatibility statement, since WordPress releases move faster than a page like this. Note which PHP version your WordPress hosting provides, and make sure your site updates are tested before the plugin is switched on.

WP Mautic docs

Reachable self-hosted Mautic

The plugin needs a public Mautic URL that the WordPress site and its visitors' browsers can both reach over HTTPS. Confirm that the instance answers on that address, that its domain and proxy settings match what the browser sends, and that an administrator account exists for generating the integration settings. An instance that only resolves on an internal network will load the WordPress admin but will not record visitor activity.

Mautic form and asset IDs

Shortcodes such as [mautic type="form" id="1"] refer to numeric IDs in Mautic, so collect the form and asset IDs before editing WordPress pages. List which forms belong on which pages, and confirm each form is published and assigned to the right contact fields. Changing or recreating a form in Mautic later can change its ID, so record the mapping in your content plan and not only in page drafts.

Mautic platform requirements

Mautic has its own runtime needs that the plugin does not change. Check the PHP, database, and web server versions for the Mautic release you run against the requirements page, and confirm the database and server are on infrastructure you control. The project states that Mautic should not be installed on shared hosting and recommends a VPS or dedicated server. Plan that hosting decision before the WordPress work begins.

Mautic requirements

Version confirmation with vendors

Before installation, confirm the WordPress and Mautic versions in your environment against the vendor documentation rather than relying on this page. Mautic publishes release lines with different support end dates, so a Mautic version that is supported today may leave security support soon. Ask the plugin maintainers which Mautic releases they test against, and record both version numbers in your change ticket so later upgrades can be checked against the same pair.

Mautic releases

How to configure the WP Mautic plugin step by step

This sequence connects a WordPress site to a Mautic instance so that tracking, forms and assets all report back to Mautic. Each step ends with a check you can run before moving on.

  1. Confirm versions and test environment first

    The site administrator confirms the WordPress version is 4.6 or later and that the Mautic instance is reachable from the public web at the address visitors will use. Work on a staging copy of the site where possible, so tracking and form changes do not reach production visitors before they are tested. Check that you can log in to Mautic and that you have the form and asset IDs you plan to use. Done when the site and Mautic both respond and you have the access you need.

  2. Install and activate the WP Mautic plugin

    A WordPress administrator installs the WP Mautic plugin from the plugin area of the dashboard and activates it. Confirm the exact installation path in the plugin documentation, since menu names can change between WordPress releases. Activation adds a settings page for the plugin. Done when the plugin appears in the list of active plugins and its settings page opens without errors.

  3. Point the plugin at the Mautic base URL

    On the plugin settings page, the administrator enters the base URL of the Mautic instance, using the same address and protocol that users see when they log in to Mautic. A mismatch between the saved address and the live address is a common cause of tracking that silently fails. Save the settings and confirm the URL in the documentation for the plugin version you installed. Done when the settings save and the Mautic URL resolves in a new browser tab.

  4. Place the tracking script in the header or footer

    The administrator chooses whether the plugin loads the tracking script in the page header or footer. The header loads the script earlier, which can capture more of a visit, while the footer keeps page rendering lighter. Confirm the trade-off against your theme and consent setup, and make sure no other plugin or theme also injects a Mautic script. Done when the page source of a public page shows the Mautic script exactly once in the chosen location.

  5. Insert the form shortcode and submit a test

    An editor places the form shortcode, such as [mautic type="form" id="1"], on a draft or test page, replacing the ID with the form ID from Mautic. The form then renders inside WordPress and submissions go to Mautic. Submit the form with a test address that your team controls. Done when the form displays correctly and the test contact appears in the Mautic contacts list with the submitted fields.

  6. Insert the asset shortcode and verify tracking

    The editor adds the asset shortcode for a Mautic asset, using the asset ID from Mautic and the syntax given in the plugin documentation for your version. Load the page in a browser, open the asset link, and confirm the file downloads. Then visit a tracked page and check that the visit appears against your test contact in Mautic. To check the fallback, load the page with JavaScript disabled and confirm the tracking pixel is requested. Done when the asset works and the visit is recorded both with and without JavaScript.

Header or footer tracking script: which to choose

Loading the tracking script in the header asks the browser to fetch and start the script before the rest of the page body is rendered. That gives Mautic the earliest possible chance to record a visit and identify a contact, which matters when a page is a campaign landing page, a link from an email, or a page where the first interaction is the point of the visit. The trade-off is that the script competes with the content the visitor came to read.

  • Early visit capture: Visits that leave quickly are more likely to be recorded, because the script runs before the visitor navigates away.
  • Campaign landing pages: Pages that receive paid or email traffic are the most common reason teams choose the header.
  • Render cost: A script in the header can delay first paint on slow connections or on pages with many other blocking assets.
  • Theme templates: Check whether your theme outputs the header hook the plugin uses, and whether a child theme overrides it.
  • Cache rules: A page cache may store the header output, so changes to the placement need a cache purge to take effect.

Before you choose the header, confirm that your performance budget can absorb the extra request on your most visited templates.

What the fallback tracking pixel covers

The WP Mautic plugin adds a fallback tracking pixel for visitors without JavaScript, so a page view can still reach Mautic when the browser never runs the tracking script. That is a useful safety net, but it changes what your reports can say. A pixel request tells Mautic that a page was loaded from a particular client. It does not, by itself, give Mautic the same picture that the script provides, so the two signals should not be counted the same way in dashboards or segment logic.

The script is the path that identifies visitors. Once it runs, Mautic can associate browsing activity with a known contact, apply the tracking cookie, and use that history for points, campaign triggers and personalization. A pixel hit from a visitor without JavaScript is typically anonymous activity, so it should be read as evidence that a page was requested, not as a confirmed person. Before you build a campaign or a report on pixel data, confirm in your own environment which attributes the pixel request actually records, how it is matched to a contact, and whether the request appears in the contact timeline at all. Test this with a browser that has scripts disabled and with a logged-in test contact.

Plan the measurement around that gap. Compare pixel counts with script-based visitor counts on a sample of pages, decide whether anonymous pixel activity will feed scoring or only traffic reporting, and document the decision so marketing and compliance teams read the same numbers. Also check how your caching layer and any consent banner affect both the script and the pixel, since either can change how many requests reach Mautic. Review the plugin's current documentation for pixel behavior at the version you install, because this section reflects only the behavior described in the supplied WordPress documentation.

Which attributes the plugin sends to Mautic

This table maps what happens on the WordPress site, including page visits, form submissions, shortcode IDs and visitors without JavaScript, to where that data lands in Mautic. Use it as a planning map for your build. The main takeaway is that the plugin documentation is the authority on exact attribute names, so confirm them in your own Mautic contact fields before you build segments or campaigns on them.

WordPress sideMautic sideCheck before building segments
Page visits with the header or footer scriptPage hits recorded against the visitor's tracking recordConfirm in the plugin docs which page data is sent and where it appears on the contact timeline
Form submission fields in a shortcode formValues stored on the contact through the matching Mautic form fieldsMap each form field to a contact field and confirm any extra fields the plugin adds
Form ID in the form shortcodeThe Mautic form with that ID, embedded on the pageMatch the id value to the correct published form in Mautic before going live
Asset ID in an asset shortcodeThe Mautic asset that the shortcode embeds or linksConfirm the shortcode type value and asset ID format in the plugin docs
Visitor identity after a form submissionContact linked to the tracking cookie so later page hits attach to that contactTest with a known address and confirm the contact record updates as expected
Visitors without JavaScriptFallback tracking pixel records a visit, usually without identifying the personTreat pixel-only hits as anonymous unless a form submission identifies the contact
Script placement in header or footerChanges when page hits fire, not which attributes are sentChoose one placement, test it on key pages, and keep it consistent across the site

Securing the WordPress to Mautic connection

The WP Mautic plugin links two systems that hold different data: a public WordPress site and a Mautic instance that stores contact records and consent history. The cards below cover the controls that protect that link, from transport encryption and plugin access to Mautic accounts and consent handling.

Serve both sites over HTTPS

Both the WordPress site and the Mautic instance should be reached only over HTTPS, so form submissions, tracking requests and any login traffic are encrypted in transit. Check that the Mautic site URL configured in the plugin uses the https scheme, and that mixed content warnings do not appear on pages that load the tracking script. Confirm certificate renewal for both hostnames is owned by a named team, since an expired certificate on either side stops tracking and form submissions without an obvious error for visitors.

WP Mautic docs

Restrict who can change plugin settings

The plugin settings define where WordPress sends visitor and form data, so anyone who can change them can redirect that data. Limit plugin configuration to a small set of administrator accounts and remove unused administrator accounts from the site. Review the list of WordPress users who can install or deactivate plugins, and record who holds the Mautic site credentials, since those credentials may be stored in the WordPress database.

Keep WordPress core and the plugin current

WordPress core, the WP Mautic plugin and every other plugin on the site form one attack surface, and an outdated component on any of them can expose the Mautic connection. Set a recurring review that checks available updates for WordPress core and the WP Mautic plugin, applies them on a staging copy first, and records the version that runs in production. Ask the plugin maintainer how security fixes are published before relying on the plugin for forms that collect personal data.

Review Mautic user accounts and roles

Mautic user accounts use basic authentication unless SAML single sign-on is configured, so password policy, account lifecycle and multi-factor options must be handled by your team rather than inherited from WordPress. Review which Mautic roles can create or edit forms, because a form that the plugin embeds on your site can collect data into any segment the form maps to. Remove accounts for staff who leave, and confirm whether the team needs SAML SSO before the connection goes live.

Mautic authentication docs

Handle consent for tracking and forms

The tracking script and embedded forms can create or update contact records, so consent decisions must be made before visitors reach those pages. Decide which pages load tracking, which forms ask for explicit marketing consent, and what the text next to each checkbox says. Verify that a visitor who declines is not added to marketing segments, and document how consent changes flow back to Mautic contacts. Plan this with your privacy team, because the plugin itself does not decide what counts as valid consent.

Test the fallback pixel and script behavior

The plugin adds a fallback tracking pixel for visitors without JavaScript, so tracking behavior differs between browsers, privacy extensions and users who block scripts. Test a form submission and a page view with JavaScript enabled and disabled, then confirm which attributes reach the Mautic contact timeline. Include this check in each release test for the WordPress site, because a theme or plugin change can move the tracking script or remove the form shortcode without warning.

Why Mautic forms or tracking do not appear on WordPress

This table lists the failures that most often stop a Mautic form or tracking script from appearing on a WordPress site, with the cause and fix for each. Work down the rows in order, since the first two checks are fast and rule out the most common problems. Check the Mautic instance logs when the fixes below do not resolve the issue or when submissions arrive without a visible error on the page.

Symptom or failureLikely causeFix and when to check logs
Wrong Mautic base URLThe plugin points to a different domain, a staging address or an http address while Mautic is served over https.Confirm the base URL in the plugin settings matches the live Mautic address exactly. Check the Mautic logs if the script loads but requests return errors.
Form ID does not existThe shortcode [mautic type="form" id="..."] references a form that was deleted, unpublished or has a different ID on this instance.Look up the form ID in Mautic and update the shortcode. Check the Mautic logs if the ID is correct but the form still renders blank.
Script placed in a theme without wp_footerThe theme does not call wp_footer() in its template, so footer tracking never runs even when the setting is footer.Switch the tracking script to the header setting or add wp_footer() to the theme footer template. Verify the script appears in the page source.
Caching plugin serves stale or blocked scriptPage caching, minification or script deferral delays, strips or rewrites the Mautic tracking script.Exclude the Mautic script and form pages from cache and optimization, then clear the cache. Check the Mautic logs if visits stop being recorded after caching changes.
Consent plugin blocks the scriptA cookie or consent banner plugin blocks third-party scripts until the visitor accepts, so the script never loads for most visitors.Allow the Mautic script under the consent category that matches your policy, and confirm the behavior with your privacy team before changing it.
Mixed HTTP and HTTPSThe site loads over https but the Mautic script, form action or asset URL uses http, so browsers block the mixed content.Use https for the WordPress site, the Mautic base URL and all embedded assets. Check the browser console for mixed content warnings.
WordPress below version 4.6The plugin requires WordPress 4.6 or later, and older installations may not load its shortcodes or hooks correctly.Upgrade WordPress to 4.6 or later before troubleshooting further. Confirm the version in the WordPress dashboard.
Fallback pixel missing for visitors without JavaScriptThe noscript fallback pixel is not output, usually because the header or footer setting was changed without checking the page source.View the page source to confirm the fallback tracking pixel is present. Expect it only when the plugin is active and the tracking setting is enabled.

Questions teams ask before connecting Mautic to WordPress

How long does it take to connect Mautic to WordPress?

Duration depends on scope rather than on the plugin itself, which is quick to install. The main drivers are how many forms and assets you embed, how complex your WordPress theme and page templates are, and what consent requirements apply before tracking can start. A site with a few forms on a standard theme is a much smaller job than a multisite network with dozens of forms in custom page builders. Ask any provider, including your own team, for a written breakdown by form count, template types and consent steps before agreeing to a timeline.

Can our internal team connect Mautic to WordPress without outside help?

Yes, if your team has someone comfortable with WordPress administration, the plugin's settings, and the Mautic admin interface. The core steps are installing the WP Mautic plugin, entering your Mautic URL, placing shortcodes for forms and assets, and choosing whether the tracking script loads in the header or footer. Where teams usually need help is in testing consent behavior, checking that the fallback tracking pixel works for visitors without JavaScript, and confirming that page caching and privacy plugins do not block tracking. An outside review is most useful for those checks.

What does it cost to connect Mautic to WordPress?

The Mautic software is free and open source, so the cost sits in the work around it. There are four components: internal staff time for configuration and testing, hosting for Mautic and for WordPress, any partner scope you buy, and ongoing maintenance of both platforms. Hosting and maintenance recur, while the plugin setup and testing are typically one-time. DeployOpen does not publish prices. A quote follows from a written scope that lists forms, pages, consent requirements and test cases, and most engagements are fixed-scope with deliverables agreed in writing before work starts.

What access do we need to provide for this work?

You need administrator access to both systems and a named owner who can approve changes. On the Mautic side, that means a user with rights to create forms, manage assets, and view the tracking configuration. On the WordPress side, you need an administrator account that can install plugins and edit the pages or templates where shortcodes will go. A test plan is equally important: list the pages and forms in scope, the consent behavior you expect, the visitor types to test (with and without JavaScript), and the sign-off steps. Agree on a staging copy of WordPress for testing before production changes.

Does the WP Mautic plugin work with a managed Mautic service?

Confirm this with your managed Mautic provider before you start. The plugin connects WordPress to a Mautic instance by URL, so a managed service can work if it exposes the Mautic endpoints the plugin needs and lets you control the forms and assets that appear on your site. Check what the provider allows for tracking scripts, asset hosting and cron-related settings, because those limits affect what you can configure. The plugin's requirements, including the minimum WordPress version of 4.6, are listed in the Mautic WordPress docs.

Should the tracking script go in the header or the footer?

The tracking script can load in either the header or the footer, and the choice affects when tracking starts and how it interacts with your other scripts. Header placement starts tracking earlier, which can matter for short visits. Footer placement lets pages render faster and avoids delaying content, but it can miss visitors who leave quickly. Test both options on a staging site with your consent banner and any caching plugin enabled, then record which one you chose and why so that future theme changes do not break it.

Do consent requirements change how we set up WordPress tracking?

Yes. Before the plugin tracks visitors, you need to decide what your consent banner controls, whether tracking waits for consent, and what happens for visitors who decline. Those choices shape where the script loads and which forms collect personal data. Involve your privacy or legal team early, because the answers should match the consent and preference settings in your Mautic configuration. DeployOpen prepares systems and evidence for compliance reviews, but it does not issue audit reports or certifications.

Official Mautic WordPress documentation

The Mautic WordPress documentation is the authoritative reference for WP Mautic plugin settings and shortcode syntax, so check it before you configure anything on a live site. Settings such as the Mautic base URL, the choice of header or footer tracking script, and the exact form of the [mautic type="form" id="1"] shortcode are documented there, and the names of fields and options can change between releases. Use the Mautic WordPress docs as the starting point for your configuration, and keep a copy of the settings you chose so a reviewer can compare them with the documentation later.

The page linked above is the 7.0 version of the documentation. Before you rely on it, confirm that the docs version matches the Mautic release line your instance runs. Check the version in your Mautic administration area and compare it with the supported releases on the Mautic releases page, since the plugin guidance you read should describe the same Mautic line you operate. If the versions differ, ask your platform owner which plugin release is compatible with your instance, and record that answer in your change ticket. Do not assume a docs page for one release line describes another.

Plan for the documentation to be the reference your team returns to after launch, not only during setup. When a WordPress update, a theme change or a Mautic upgrade alters how tracking or forms render, the documentation and your recorded settings tell you what was intended. Assign one owner to review the documentation after each Mautic upgrade and after each WP Mautic plugin update, and have that owner confirm that the settings on the WordPress site still match the documented options.

How DeployOpen scopes and delivers the WordPress integration

DeployOpen plans, implements, tests and documents self-hosted open-source platforms inside the client's own infrastructure. For a WordPress integration with the WP Mautic plugin, we agree the scope in writing first, then build and verify the tracking and form embedding in your environment before handing it over.

How we scope

  • Confirm the WordPress version and the Mautic release line the site will connect to before any work starts
  • List which pages need the tracking script, which forms and assets need shortcodes, and which pages stay untracked
  • Agree in writing whether the script loads in the header or footer, and how the fallback tracking pixel is handled
  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work begins

How we build

  • Install and configure the WP Mautic plugin on a staging copy of the WordPress site first
  • Embed Mautic forms and assets with shortcodes, and check each one renders and submits to the right Mautic instance
  • Test the tracking script in header and footer placement, and confirm the attributes sent to Mautic match the planned contact model
  • Check the fallback tracking pixel behavior for visitors with JavaScript disabled

How we hand over

  • Deliver a written record of the WordPress version, plugin version, shortcode inventory and script placement chosen
  • Document the test results for forms, tracking and fallback pixel, including the pages and browsers covered
  • Walk your WordPress and marketing teams through how to add new forms and assets with shortcodes safely
  • Record any site or Mautic settings that your compliance or consent owners need to review

How we support

  • Ongoing support, plugin and WordPress update checks, and continuous testing are available as a retainer
  • Retesting of forms and tracking after WordPress, theme or Mautic upgrades is part of the support scope when agreed
  • Confirm with your team whether a retainer should cover plugin version reviews and changes to tracked pages
  • A quote follows from the written scope, and DeployOpen does not publish a price list

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.