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

  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

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 sourceMautic fieldNotes
emailemailRequired. The dedupe / merge key.
first_namefirstname
last_namelastname
phonephone
companycompany
city / state / postal_code / countrycity / state / zipcode / country
visitor IPipAddress (+ X-Forwarded-For)Drives Mautic geo/IP lookup.
event timestamplastActiveUTC, Y-m-d H:i:s.
UTM parametersutm_source / utm_medium / utm_campaign / utm_content / utm_termFirst-touch / last-touch attribution.
marketing consenttagsAdds 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 eventAction in Mautic
pageUpsert Contact (refreshes IP, last-active, UTM) when an email trait is present
IdentifiedUpsert Contact with the latest identity traits
Signed UpUpsert Contact; stamps signal_signup_method
Lead CapturedUpsert 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

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.