Hi everyone, first time here!
I'm facing a persistent issue with Mautic tracking, and I'm hoping someone familiar with Mautic on Cloudron can help.
Problem Description:
My Laravel application sends tracking data to Mautic (v5.1.0, hosted on Cloudron) via the mtc.js
script. When a user logs in, I send a pageview
event with their email, first name, last name, phone, a custom user_id_app
field, and a tags: ['app-user']
parameter.
I've confirmed the following:
- The
pageview
request is sent from my app (app.example.com
) to Mautic (mautic.example.com
). - The browser's Network tab shows a
200 OK
response for theevent
request, and the Payload clearly contains all the contact data (email, name, tags, etc.). - My Mautic cron jobs (
mautic:segments:update
,mautic:campaigns:trigger
, etc.) are configured and running every 15 minutes. - The
email
custom field in Mautic is correctly set up as "Email" type, with "Alias:email
", and "Is Unique Identifier:Yes
".
The Issue:
Despite all this, after several hours and multiple cron job executions, these contacts remain anonymous in Mautic. Even stranger, their contact profiles do not show the email, first name, or last name populated, although the app-user
tag does get applied. This inconsistency (tag applied, but no identifying data) is what's puzzling me.
Current Hypothesis:
I suspect this might be related to how Mautic handles cookies across subdomains. My main application is on app.example.com
, while Mautic is on mautic.example.com
. The Mautic tracking cookies (mtc_id
, mautic_device_id
) are currently set for the mautic.example.com
domain. This could be preventing Mautic from correctly associating the tracking session from my main app with the contact data. Setting a common cookie_domain
(e.g., .example.com
) would allow these cookies to be shared across subdomains.
My Question:
I need to configure Mautic's cookie_domain
to .example.com
. I've checked Mautic's UI under "ConfiguraciĂłn de Seguimiento" (Tracking Settings) and "ConfiguraciĂłn de la API" (API Settings), but I cannot find an explicit option for "Tracking script domain" or "Cookie domain" there.
How can I configure the cookie_domain
for Mautic (v5.1.0) when hosted on Cloudron? Is this done via:
- A specific environment variable in Cloudron (and what would its name be, e.g.,
MAUTIC_COOKIE_DOMAIN
)? - Editing a Mautic configuration file directly (e.g.,
app/config/local.php
) via the Cloudron web terminal (and what would the key be)?
Any guidance or similar experiences with Mautic on Cloudron would be greatly appreciated!
Thanks in advance.