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.
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
Mautic is your own CRM, so personal data is delivered in plaintext (no hashing). The integration maps the following from datafly.identify() traits and the request context to native Mautic Contact field aliases:
| Signal source | Mautic field | Notes |
|---|---|---|
email | email | Required. The dedupe / merge key. |
first_name | firstname | |
last_name | lastname | |
phone | phone | |
company | company | |
city / state / postal_code / country | city / state / zipcode / country | |
| visitor IP | ipAddress (+ X-Forwarded-For) | Drives Mautic geo/IP lookup. |
| event timestamp | lastActive | UTC, Y-m-d H:i:s. |
| UTM parameters | utm_source / utm_medium / utm_campaign / utm_content / utm_term | First-touch / last-touch attribution. |
| marketing consent | tags | Adds signal-marketing-consent when granted, removes it when denied. |
How to send user data
Call datafly.identify() when a visitor logs in, registers, or submits a form:
datafly.identify("user-123", {
email: "jane.doe@example.com",
firstName: "Jane",
lastName: "Doe",
phone: "+44 7700 900123",
city: "London",
country: "GB"
});Events that carry no email are dropped before delivery — Mautic cannot form a meaningful Contact without an identifier. Make sure you call datafly.identify() (or attach an email trait) before the events you want synced.
Event Mapping
The Default preset delivers identity-bearing events as a Contact upsert. All mapped events resolve to the same POST /api/contacts/new call; what differs is the trait/property data attached.
| Signal event | Action in Mautic |
|---|---|
page | Upsert Contact (refreshes IP, last-active, UTM) when an email trait is present |
Identified | Upsert Contact with the latest identity traits |
Signed Up | Upsert Contact; stamps signal_signup_method |
Lead Captured | Upsert Contact; stamps signal_lead_source |
All other events are dropped (defaults.action: drop).
Example: Signed Up event
Datafly.js call:
datafly.identify("user-123", {
email: "jane.doe@example.com",
firstName: "Jane",
lastName: "Doe"
});
datafly.track("Signed Up", {
method: "email"
});Mautic payload sent by Signal:
{
"email": "jane.doe@example.com",
"firstname": "Jane",
"lastname": "Doe",
"ipAddress": "203.0.113.50",
"lastActive": "2026-06-06 14:32:10",
"utm_source": "newsletter",
"utm_medium": "email",
"signal_signup_method": "email",
"tags": ["signal-marketing-consent"]
}Mautic responds 201 Created with the full Contact object (or 200 when an existing Contact on the same email is updated).
signal_signup_method and signal_lead_source are sent as Contact field aliases. If you want them stored, create matching custom fields in Mautic under Settings > Custom Fields; otherwise Mautic ignores unknown aliases.
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. |