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
- In Mautic, go to Settings (the cog icon) > Configuration > API Settings.
- Set API enabled? to Yes.
- Set Enable HTTP basic auth? to Yes.
- 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.
- Go to Settings > Users.
- Create a dedicated user for Signal (recommended) or pick an existing one.
- Make sure the user’s role grants permission to create and edit contacts.
- 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
| Field | Required | Description |
|---|---|---|
base_url | Yes | Root URL of your Mautic instance, with scheme and no trailing slash (e.g. https://mautic.example.com). |
api_user | Yes | Username of the Mautic user Signal authenticates as. |
api_password | Yes | Password for that user. Stored encrypted and used only for the Basic Auth header. |
Management UI Setup
- Go to Integrations > Add Integration > Mautic.
- Choose the Default preset.
- Enter your
base_url,api_user, andapi_password. - Select the consent categories that should gate delivery (typically
marketing). - Click Save.
API Endpoint
POST https://{base_url}/api/contacts/newSignal 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).
| Field | Source | Notes |
|---|---|---|
email | traits.email | Plain text, trimmed and lowercased: Mautic’s unique identifier. Events without it are not sent. |
phone | traits.phone | E.164. |
city, state, zipcode, country | traits.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 event | Vendor event / call | Fields |
|---|---|---|
page | contact_upsert | |
identify | contact_upsert | |
sign_up | contact_upsert | signal_signup_method |
generate_lead | contact_upsert | signal_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 event | Vendor event / call | Fields |
|---|---|---|
identify | contact_upsert | |
sign_up | contact_upsert | signal_signup_method |
login | contact_upsert | |
purchase | contact_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 event | Vendor event / call | Fields |
|---|---|---|
identify | contact_upsert | |
sign_up | contact_upsert | signal_signup_method |
login | contact_upsert | |
trial_started | contact_upsert | |
generate_lead | contact_upsert | signal_lead_source |
demo_requested | contact_upsert | signal_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
| Problem | Solution |
|---|---|
401 Unauthorized | Basic Authentication is not enabled in Mautic, the credentials are wrong, or the API itself is disabled. Re-check Settings > Configuration > API Settings. |
403 Forbidden | The API user lacks permission to create/edit contacts. Adjust the user’s role. |
404 Not Found | base_url is wrong or has a trailing slash. It must be the bare instance root, e.g. https://mautic.example.com. |
| Duplicate contacts | Mautic 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 location | Ensure 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 stored | signal_signup_method / signal_lead_source need matching custom field aliases in Mautic, otherwise they are ignored. |