Mautic

Datafly Signal syncs identified visitors into Mautic, the open-source marketing automation platform, as Contacts. Signal delivers email, name, phone, location, the visitor’s IP, and UTM attribution server-to-server to your own Mautic instance using the Mautic REST API. Because delivery is server-side, contacts are created and kept current without loading the Mautic tracking script in the browser.

Why route Mautic through Datafly Signal

  • Profiles are updated from the server, not the browser. Events reach Mautic even when a tracker blocker or a failed page unload would have dropped a client-side call, so the profile reflects what actually happened.
  • One consent decision governs every destination. Mautic is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.

Prerequisites

You need a running Mautic instance (self-hosted or cloud) that Signal can reach over HTTPS, and a Mautic user whose credentials Signal will use for the API.

Step 1: Enable the API

  1. In Mautic, go to Settings (the cog icon) > Configuration > API Settings.
  2. Set API enabled? to Yes.
  3. Set Enable HTTP basic auth? to Yes.
  4. Click Apply / Save & Close.

The Mautic API is disabled by default, and Basic Authentication is a separate toggle. Both must be on for Signal to deliver contacts with username/password credentials.

Step 2: Create or choose an API user

Signal authenticates as a normal Mautic user over HTTP Basic auth.

  1. Go to Settings > Users.
  2. Create a dedicated user for Signal (recommended) or pick an existing one.
  3. Make sure the user’s role grants permission to create and edit contacts.
  4. Note the user’s username and password — Signal needs both.

Step 3: Note your instance URL

Your Mautic base URL is the root of the instance, for example https://mautic.example.com. Signal appends the API path automatically.

Configure in Signal

Configuration Fields

FieldRequiredDescription
base_urlYesRoot URL of your Mautic instance, with scheme and no trailing slash (e.g. https://mautic.example.com).
api_userYesUsername of the Mautic user Signal authenticates as.
api_passwordYesPassword for that user. Stored encrypted and used only for the Basic Auth header.

Management UI Setup

  1. Go to Integrations > Add Integration > Mautic.
  2. Choose the Default preset.
  3. Enter your base_url, api_user, and api_password.
  4. Select the consent categories that should gate delivery (typically marketing).
  5. Click Save.

API Endpoint

POST https://{base_url}/api/contacts/new

Signal sends a flat JSON Contact body authenticated with HTTP Basic auth (Authorization: Basic base64(api_user:api_password)). Mautic deduplicates incoming contacts on its unique identifier field — email by default — so repeated deliveries for the same visitor merge onto one Contact rather than creating duplicates.

Signal forwards the original visitor’s IP as X-Forwarded-For (and in the ipAddress body field) so Mautic’s IP and geo lookup attributes the Contact to the real visitor, not to the Signal server.

Identity Signals

Server-side contact sync to a self-hosted or cloud Mautic instance. Upserts the identified visitor via POST /api/contacts/new (matched on email, sent in plain text, trimmed and lowercased, because Mautic keys the contact on it) with name, phone (E.164), company, address, visitor IP, last-active time, UTM custom fields (signal_utm_*) and a marketing-consent tag. Events without an email are not sent (Mautic would otherwise create an anonymous contact per call).

FieldSourceNotes
emailtraits.emailPlain text, trimmed and lowercased: Mautic’s unique identifier. Events without it are not sent.
phonetraits.phoneE.164.
city, state, zipcode, countrytraits.address.*Canonical address traits first, the flat legacy traits second.

Event Mapping

Blueprint 0.3.0, reviewed against the vendor’s documentation on 2026-09-23. Each preset maps the events below; every other event is dropped. Events use the canonical names from the event specs (transaction_id, value, items[], search_term); the legacy order_id, revenue and flat product fields are still read as a fallback.

Default (default)

Upsert identified visitors as Mautic Contacts. Email is the dedupe key (Mautic merges on email by default). Maps name, phone, city/state/zip/country, visitor IP (for Mautic geo/IP lookup), last-active time, UTM attribution, and a marketing-consent tag. Events without an email trait are dropped because they cannot form a meaningful Contact.

Datafly eventVendor event / callFields
pagecontact_upsert
identifycontact_upsert
sign_upcontact_upsertsignal_signup_method
generate_leadcontact_upsertsignal_lead_source

Retail / E-commerce (ecommerce)

Keeps the Mautic contact current from a shop: identify, sign_up, login and purchase each upsert the identified contact (POST /api/contacts/new, matched on email) with name, phone, address, last-active time, visitor IP, UTM custom fields and the marketing-consent tag. Mautic has no order or event object on its REST API, so purchases update the contact only.

Datafly eventVendor event / callFields
identifycontact_upsert
sign_upcontact_upsertsignal_signup_method
logincontact_upsert
purchasecontact_upsert

B2B / SaaS (saas)

Lead and account lifecycle for B2B: identify, sign_up, login, trial_started, generate_lead and demo_requested upsert the identified contact (matched on email) with the standard fields, UTM custom fields, lead source and sign-up method.

Datafly eventVendor event / callFields
identifycontact_upsert
sign_upcontact_upsertsignal_signup_method
logincontact_upsert
trial_startedcontact_upsert
generate_leadcontact_upsertsignal_lead_source
demo_requestedcontact_upsertsignal_lead_source

An identified sign_up (preset default) is delivered as:

POST https://mautic.acme.example/api/contacts/new
{
  "city": "Bath",
  "company": "Acme Ltd",
  "country": "GB",
  "email": "jane.doe@example.com",
  "firstname": "Jane",
  "ipAddress": "203.0.113.7",
  "lastActive": "2025-09-23 04:00:00",
  "lastname": "Doe",
  "phone": "+447700900123",
  "signal_signup_method": "email",
  "signal_utm_campaign": "autumn",
  "signal_utm_medium": "email",
  "signal_utm_source": "newsletter",
  "state": "Somerset",
  "tags": [
    "signal-marketing-consent"
  ],
  "zipcode": "BA1 1AA"
}

Testing

Trigger an identified event

On a page running Datafly.js, call datafly.identify() with a test email, then datafly.track("Signed Up", { method: "email" }).

Check Signal’s event debugger

In the Management UI, open the integration’s event debugger and confirm the Mautic delivery shows a 201 (new) or 200 (updated) response.

Verify in Mautic

In Mautic, go to Contacts and search for the test email. You should see the Contact with the name, IP-derived location, last-active time, and the signal-marketing-consent tag.

Troubleshooting

ProblemSolution
401 UnauthorizedBasic Authentication is not enabled in Mautic, the credentials are wrong, or the API itself is disabled. Re-check Settings > Configuration > API Settings.
403 ForbiddenThe API user lacks permission to create/edit contacts. Adjust the user’s role.
404 Not Foundbase_url is wrong or has a trailing slash. It must be the bare instance root, e.g. https://mautic.example.com.
Duplicate contactsMautic merges on its unique identifier field (email by default). Confirm email is set as the unique identifier under Settings > Custom Fields.
Contact created but no locationEnsure the visitor IP is reaching Mautic — Signal forwards it as X-Forwarded-For; check any reverse proxy in front of Mautic preserves the header.
Custom fields not storedsignal_signup_method / signal_lead_source need matching custom field aliases in Mautic, otherwise they are ignored.