Google Analytics and Facebook Pixel through Mautic tracking

Learn which parts of Mautic load Google Analytics and the Facebook Pixel, how to configure them, and what to verify for IP anonymization and consent before launch.

On this page

Google Analytics and Facebook Pixel through Mautic tracking: what it does

The marketing or privacy lead usually wants two things at once: Google Analytics and the Facebook Pixel should see the visits Mautic already records, and the setup should not break the privacy rules the organization has to follow. This page does not yet have a documented, vendor-verified method supplied for either tool through Mautic. The steps described here are a review sequence to confirm against the current Mautic documentation and the vendor documentation for the exact Mautic version you run. Treat any code snippet you find in a forum or plugin listing as unverified until it has been checked against both.

In practice, the work means placing third-party tag code inside two places: the Mautic tracking script that runs on your own websites, and the pages Mautic hosts as landing pages. Each placement sends visitor data to a third party, so the question is not only whether the tag loads but what it sends, when it fires, and whether consent has been given before it does. Mautic's own tracking script and the vendor tags can also overlap, which may double-count visits or change how a conversion is attributed. Confirm those effects with a test visit before anyone reads the reports.

Before any code is placed, decide who owns each tag, which pages carry it, and what the consent basis is for each vendor. Ask the Mautic administrator to identify where the tracking code is stored in the installed version and whether the landing page builder accepts custom head or footer script blocks. Ask the privacy lead to document whether IP anonymization is required and how the analytics property and the ad account handle IP addresses. Those answers determine whether the setup can stay within the organization's consent and data handling rules. Ask the vendors to confirm their current requirements for IP anonymization and consent signals, since those settings change over time.

Plan the verification before the build. Use a staging copy of the site, a browser with tag-debugging tools, and a list of test cases covering consented and declined visitors, form submissions and landing page visits. Record what each tool receives in each case. A partner or internal team can then show the privacy lead evidence of behavior, not only a configuration screen. Any gap found in review should go back to the scope before launch.

What you need before loading third-party tags through Mautic

Loading Google Analytics or the Meta Pixel through Mautic touches the running release, the server stack, the tracking configuration and the privacy position at once. The cards below cover what to confirm on each of those before any tag is added, so the setup is not reworked after a compliance review.

Mautic version and release line

Confirm which Mautic release you run and whether it still receives security fixes. The support end dates differ by release line, and support windows are the first thing to check on the Mautic releases page, since tag changes made on an unsupported line may need rework after an upgrade. Record the exact version in your change ticket so the tracking setup can be tested against it.

Mautic 7.2 support end
30 September 2026
Mautic releases

PHP, database and web server

The running release must meet its platform requirements before you change templates or tracking settings. Mautic 7.0 requires PHP 8.2 to 8.5, MySQL 5.7 or higher with InnoDB or MariaDB 10.2 or higher, and Apache, Nginx or IIS. Mautic should not run on shared hosting, so confirm you are on a VPS or dedicated server.

Mautic requirements

Tracking settings and landing page access

Someone on your team needs an administrator role that can edit the tracking settings and the landing page builder. Without it, the Google Analytics and Meta Pixel snippets cannot be added to the Mautic tracking code or to landing pages. Confirm the role on a staging instance first, and record who holds it, since these settings can send data to third parties on every page view.

Owned Google Analytics property and Meta Pixel ID

The organization, not an agency or a individual, should own the Google Analytics property and the Meta Pixel ID. Confirm that the measurement identifiers and the account administrators are controlled by your team, so that access can be revoked when a vendor or staff member leaves. Ask the vendors which identifier format each tool expects before the snippets are written.

Written data decision from privacy or legal

Before any tag fires, obtain a written decision from privacy or legal on which fields may reach each tool. The decision should list page URLs, referrers, contact identifiers, form values and IP handling separately for Google Analytics and the Meta Pixel. This record becomes the reference for the consent settings and IP anonymization that follow in the setup.

How a visit flows from the browser to Mautic, analytics and the ad pixel

The flow starts when a visitor loads a page on your website or a Mautic landing page. The page loads the Mautic tracking script, which sends the visit to Mautic's tracking endpoint on your own domain. Google Analytics and the Meta Pixel are separate tags that send data to third-party hosts, so they cross the trust boundary. Check that consent state gates each third-party tag and that IP anonymization is set in Google Analytics before any hit leaves the page.

Visit data flows from the browser to Mautic on your domain and to third-party tag hosts.

Where the tags can load: tracking code, website pages or Mautic landing pages

This path applies when the website already loads Mautic's tracking script, mtc.js, and the team wants Google Analytics or the Facebook Pixel to run alongside it through Mautic's tracking configuration. Mautic's tracking settings are the single place where the snippet is managed, so a change here reaches every page that loads the script. Mautic administrators usually own this area, while the marketing operations owner approves which tags are allowed to run.

  • What changes: Tag code is added to the tracking configuration in Mautic, and the change only takes effect on pages that load the Mautic script.
  • Who edits it: A Mautic administrator with access to the configuration, after the marketing owner signs off the tag IDs.
  • How it is tested: Load a test page, check the browser network panel for the Google and Facebook requests, and confirm the tags fire once per page view.
  • What to confirm: Check the installed Mautic version's documentation for custom script injection in tracking settings, since support and field names differ between releases.
  • Risk to plan for: Tags added here run on every page with the script, so a faulty snippet can affect the whole site.

Before relying on this path, confirm in the admin panel of your exact version where custom scripts can be entered and whether they run before or after the tracker.

How to configure Google Analytics and the Facebook Pixel in Mautic

This sequence moves Google Analytics and the Facebook Pixel from approved scope to verified hits, with each tool confirmed separately before the next change goes in.

  1. Approve the data and consent scope

    Your privacy or compliance owner, with marketing, lists which pages will load each tag, which fields and events each tool may receive, whether IP anonymization is required, and whether consent must be captured before either tag fires. Record the decisions in writing so the tag configuration can be checked against them later. Done means a signed-off scope note exists and names every tag, page group and data element in scope. Confirm consent behavior with your legal team, since Mautic's consent settings are a separate control to review under the Mautic compliance guidance.

  2. Create the analytics property and pixel

    Someone with administrator access to the Google Analytics account and the Meta Business account creates the GA4 property and the Meta pixel under accounts your organization owns, not under an individual's personal login. Record the measurement ID and pixel ID in your configuration register, and confirm which admin roles can edit them. Done means both identifiers exist, are owned by company accounts, and are visible to at least two named administrators. Confirm current property and pixel creation steps in each vendor's help center, since menu names change.

  3. Add the tags in one placement

    An engineer adds the Google Analytics tag to one placement first, typically a single custom HTML or header setting in the Mautic tracking or landing page configuration that your scope note allows, and leaves the Facebook Pixel disabled. Keep the change in version control or a documented change record so it can be reverted. Done means the tag appears in the rendered page source of one test page only, and no other page group has changed. Confirm where Mautic exposes custom tracking code in your installed version before editing.

  4. Enable IP anonymization in analytics settings

    The analytics administrator turns on IP anonymization in the Google Analytics data stream settings, and the engineer confirms that no Mautic setting or custom snippet sends a full visitor IP to the tool. Record the setting state and the date it was changed in the change record. Done means the analytics admin screen shows anonymization enabled and the reviewer has signed off on the tag output. Confirm the current anonymization control name and its effect with Google's documentation for your property type.

  5. Add the Facebook Pixel in one placement

    Once the Google Analytics tag is verified, the engineer adds the Facebook Pixel base code to the same single placement, then enables it for the test page. Only the base code is added at this stage, with no custom events, so the scope of data sent stays as approved. Done means the pixel code is present on the test page alone and the change record lists both tags as active for that placement. Confirm with Meta's current pixel guidance how the base code should be placed and whether any consent gating applies in your region.

  6. Load a test page and check hits

    A tester opens the test page in a clean browser session, first with consent accepted and then declined if your scope requires gating, and triggers a page view and one form submission. The tester checks the Google Analytics real-time report and the Meta Events Manager test events view, comparing what arrived against the scope note. Done means each tool shows the expected page view, no unapproved fields or events appear, and the results are saved as evidence. Confirm the exact report and test view names in the versions you use.

  7. Extend to other pages and document

    After the test page passes, the team adds the tags to each further placement in the approved scope, one group at a time, and repeats the hit check for each group. The configuration register, scope note and test evidence are then updated and stored with the Mautic change log so an auditor or reviewer can trace each tag to its approval. Done means every in-scope page group shows verified hits, and the register matches what the live pages load. Menu names in Mautic and the vendor consoles must be confirmed in the installed version before each change.

Which visitor and page data each tool receives

This table maps each visitor and page data item to Google Analytics and the Facebook Pixel, showing whether it is sent in full, sent anonymized, or withheld. Read each row as a recording decision, with the control point and approver beside it. Confirm every default in your installed Mautic version and in each vendor's current settings before any tag goes live, because tracking options change over time.

Data itemGoogle AnalyticsFacebook PixelControl point and approver
Page URL and pathDecide per page; remove query parameters that carry personal dataSent on each page load where the pixel fires; limit by pageTag placement on pages; privacy lead approves
ReferrerSent by the browser unless the site referrer policy limits itSent by the browser; check the site referrer policySite referrer policy; web lead approves
UTM parametersSent as URL parameters; review naming before launchSent in the page URL; same review as page URLCampaign naming standard; marketing operations approves
Device and localeCollected by the analytics script from the browserCollected by the pixel from the browserConsent category for each tag; privacy lead approves
Mautic contact IDWithheld by default; send only with a documented useWithheld by default; matching needs a documented legal basisMautic tracking and integration settings; DPO approves
Form submissionsSend a conversion event only, with no field valuesSend a conversion event only, with no field valuesForm and event mapping; marketing and DPO approve
IP addressConfirm how the property handles IP data and anonymization for your setupSent from the browser to Meta; confirm what Mautic can changeIP anonymization setting; privacy lead approves

Security and privacy controls for third-party tags on Mautic pages

Google Analytics and the Facebook Pixel run as scripts on pages that Mautic serves, so a change to one tag can expose visitor data to a third party. The controls below cover who can change those scripts, where tag IDs live, how scripts are rechecked after upgrades, what data leaves the site, and how changes are recorded.

Restrict who edits tracking code

Limit editing rights for the tracking code, landing page custom scripts and focus item HTML to a short named list of administrators. Any user who can paste JavaScript into a Mautic page can add a tag or read form fields, so treat script permissions as a higher level than content editing. Check the role assignments in Mautic's user roles each quarter and remove access for people who have changed teams. Confirm which Mautic roles can reach these settings in your version before you assign them.

Keep tag IDs in controlled settings

Store the Google Analytics measurement ID and the Facebook Pixel ID in one controlled location, not copied into individual landing pages, emails or focus items. When an ID is hardcoded in many places, a retired or wrong ID keeps sending data after the property is changed. Record which pages reference each ID so a rotation or removal reaches every page. Ask your implementation partner where the IDs are read from and how a change is propagated.

Review scripts after each upgrade

Recheck every third-party script after each Mautic upgrade, because a new release can change how the tracking script is injected, how landing page HTML is sanitized, or which default scripts load. Compare the rendered page source before and after the upgrade on a staging copy and confirm each tag fires once, with the expected ID. Schedule this review alongside your Mautic release plan so it happens on every minor and major release, not only when something breaks.

Limit data sent to vendors

Decide which fields reach Google and Meta before the tags go live. Default Google Analytics and Pixel configurations can capture full page URLs, query strings and referrers, and form pages may contain personal data in the path. Configure IP anonymization where your privacy rules require it, remove personal identifiers from URLs and page titles, and avoid passing contact fields into tag events unless a documented purpose exists. Confirm the exact parameters each vendor receives with your legal and privacy team.

Log changes to tag configuration

Keep a dated record of every change to tracking scripts, tag IDs, consent-related logic and landing page HTML, including who made it and why. Mautic's audit information and your version control for exported page code can support this record, but confirm what Mautic logs for script edits in your version. Review the log when a vendor property changes or an incident occurs, so you can tell whether data flow changed on a specific date.

Common failures when tags load through Mautic and how to fix them

This table lists common failures when Google Analytics and the Facebook Pixel load through Mautic, with the likely cause, the check to run and the fix for each. Where the behavior depends on the installed Mautic version or plugin set, the fix says to confirm it first. Start with the check column in order, because several failures share a symptom but have different causes.

FailureLikely causeCheck to runFix
Tags do not fire on Mautic landing pagesThe analytics or pixel snippet was added to the tracking settings or a site-wide header, but landing pages built in Mautic use their own page template and may not include that output.Open a published landing page, view the page source and search for the Google Analytics and Facebook Pixel IDs. Then check the browser network panel for requests to the analytics and pixel endpoints.Add the tags through the landing page's custom head or tracking section, or through the page template, and confirm the setting in your installed version. Republish the page and test again.
Duplicate pageviews in Google AnalyticsThe same tag runs twice: once from the site template or CMS and once through Mautic's tracking code or a tag manager container that also loads Google Analytics.Count tag IDs in the page source. Use the browser debugging tool to see how many analytics hits fire on one page load.Keep one loader for each tag. Remove the duplicate from either the CMS or the Mautic configuration, and confirm which tracking method your installed version supports.
No IP anonymization in Google AnalyticsThe anonymization setting was not carried into the configuration that actually sends hits, or the analytics property was created without it and the setting was never applied on the page.Inspect the loaded analytics configuration in the browser for the anonymize IP parameter. Check a recent hit in the analytics real-time view and confirm how IP data is recorded for your property.Set the anonymization option in the same configuration that loads the tag. Confirm the current option name and behavior with the Google Analytics documentation for your property type before relying on it.
Pixel events missing after a Mautic upgradeA template, theme or plugin override that inserted the pixel code was not updated for the new release, or the upgrade changed how custom scripts are output.Compare pixel events in the Meta Events Manager before and after the upgrade. Check the page source on a test page and review any theme or plugin overrides against the release notes.Re-apply the pixel code in the supported location, remove stale overrides, and retest standard events. Confirm the release notes for the version you are moving to before the upgrade.
Consent banner does not block tagsThe tags load in the page head regardless of consent, so the banner only records a choice without stopping loading. Mautic's own tracking script may also run before consent is recorded.Reject consent in a private browser session, then check the network panel for analytics and pixel requests. Repeat after accepting to confirm that loading follows the choice.Load the tags only after a consent signal from your consent management tool, and confirm how Mautic's tracking script is gated in your version. Ask your privacy lead to sign off on the rules before go-live.
Events fire on the wrong pages or with wrong valuesTags are placed in a shared header or footer that Mautic dynamic content or focus items alter, or campaign-driven pages carry parameters that the event setup does not expect.Open several different page types and compare the event parameters sent. Check whether dynamic content or focus items change the page content that triggers events.Scope events to the page elements or URLs that matter, and test each page type separately. Document which template each tag lives in so future changes are visible.
Analytics shows visitors that Mautic does not recognizeGoogle Analytics and Mautic count visitors with different identifiers, so the two systems will not match one-to-one, especially for anonymous visitors and blocked cookies.Compare a sample of visits in each system for the same period. Check whether cookies are blocked or reset in the test browser.Set expectations that the two systems are separate records. If you need one identifier, plan it with your analytics and privacy owners rather than assuming Mautic and analytics share one.

Questions teams ask before loading analytics and pixels through Mautic

How much effort does loading Google Analytics and the Facebook Pixel through Mautic take?

The effort depends less on the tags themselves than on how many properties, events and consent states you need to handle. A basic page-view setup is a small task once Mautic is running and its tracking script is in place. Effort grows with custom events, conversion goals, separate tags for each site or language, and the number of landing pages and CMS templates that must carry the code. Each added condition means more testing across browsers and consent outcomes. Ask any partner to list the tags, events and page types in the written scope before agreeing a timeline, because that list is what sets the work.

What drives the cost of an outside partner for this work?

Cost follows the written scope. The main drivers are the number of tracking destinations, the number of sites and landing page templates that need the code, how many custom events or conversions must be mapped, and whether consent logic must gate the tags. Partners also charge for the privacy configuration, including IP anonymization settings and documentation of what data leaves your environment. One-time work covers design, configuration and testing. Recurring costs appear only if you buy ongoing support or continuous testing after each Mautic upgrade. Ask for a quote that separates these items and names who performs each step.

Can our own team load these tags through Mautic without help?

A capable internal team can do it if it already runs Mautic and has access to tracking settings, the site templates and a test environment. The work requires someone who understands how the Mautic tracking script records page visits, someone who can edit the pages that carry the code, and someone who can verify what each tag sends. Teams often underestimate the verification step. Confirm that your engineers can check tag firing, event payloads and consent behavior before deciding to build internally. The Mautic documentation for your release line is the right reference for the exact settings and screens, since they change between versions.

What does the work need from marketing, privacy and web teams?

Each group owns a different decision, and the project stalls if one of them is missing.

  • Marketing defines which events, conversions and audiences the Google Analytics and Facebook Pixel data must support.
  • Privacy or legal decides what consent is required, which IP anonymization rule applies and which data may be sent to each platform.
  • Web teams confirm which templates, CMS pages and landing pages receive the code, and who approves changes to production.

Agree these answers in writing before configuration starts. Privacy decisions in particular should be recorded, because they determine what the tags are allowed to do.

How long does testing take, and what is one-time versus recurring?

Testing duration depends on the number of tags, pages and consent states in scope, so ask for the test plan and its exit criteria rather than a single number. Plan separate checks for page-view firing, custom events, form submissions, landing pages and IP anonymization. One-time work includes configuration, documentation and the first full test pass. Recurring work includes re-testing after Mautic upgrades, after changes to the site templates and after platform changes to the tags themselves. The official Mautic release notes and the documentation for your version list the steps that may change between releases.

Which steps change with the Mautic version we run?

Tracking code placement, tracking script settings and landing page behavior can change between Mautic release lines, so the exact steps depend on your installed version. Mautic follows a monthly patch cadence, quarterly minor releases and a major release every two years, and security support ends on different dates for each line. Confirm your version and its support end date before planning, then follow the matching version of the official docs. If your installation is on a release line nearing the end of security support, plan the upgrade before adding tag configuration, so the work is not repeated.

How DeployOpen works on this

DeployOpen plans, implements, tests and documents Mautic tracking inside your own infrastructure, so the tag setup, consent logic and IP handling can be reviewed by your privacy and marketing teams. We start from a written scope that names each tag, each destination and each privacy rule before any code changes.

How we scope

  • Engagements are fixed-scope, with the list of tags, destinations and pages written down before work starts
  • We record which Mautic tracking code, landing pages and websites will load Google Analytics or the Facebook Pixel
  • The scope states how IP anonymization is applied and which consent conditions must be met before any tag fires

How we build

  • We configure the Google Analytics and Facebook Pixel loading through Mautic's tracking code and landing page settings
  • We test that each tag loads only for the pages and consent states named in the scope, using browser-level checks
  • We verify IP anonymization settings against a sample of recorded visits and confirm which data reaches each vendor

How we hand over

  • You receive documentation of every tag, its trigger, its consent condition and the Mautic setting that controls it
  • We provide a test record showing what was checked, on which pages, and with which consent states
  • Your team receives a walkthrough so changes to tags or consent rules can be made and reviewed internally

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover
  • Retests can be scheduled when Mautic releases, vendor tag changes or site template updates affect tracking
  • Quotes follow from the written scope, and we recommend confirming vendor terms with your legal and privacy teams

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.