Mautic can not track data from Safari browser

Mautic can not track data from the Safari browser. Mautic was installed as a module for Drupal. Safari Browser version: 12.1.2.
It works in Chrome perfectly fine though.

Moving this to #support as it’s more appropriate to be there, I feel.

Hi Daria,
there are no know issues with Safari.
My best guess is: You are currently logged in to the Mautic backend - that would cause Mautic not to track what you do in the frontend.

Best,
Ekke

Actually, we noticed that browsers receive cookies without SameSite attribute set to None and Secure attribute, too. In Safari, these cookies are blocked, as well as in many other browsers, like Firefox, Chromium. I guess we need to add it to our nginx server configuration to resolve this issue.

Also I am wondering why Mautic sends cookies with this attributes being not set.

Not sure what makes you think that Safari would block those cookies. Chrome (80+) is the only one afaik.
Nonetheless, what’s your Mautic version? Mautic 2.16 should set the SameSite cookie.

In Safari and Firefox browsers this cookie attribute is not set, thus it is blocked.

We are using Mautic 2.16

Safari:

Firefox:

Chromium:

Not sure what is going on.
a) In 2.16.0, the header DOES get set, definitely.
Sample from a real header:
Set-Cookie: mtc_id=270590; path=/; SameSite=None; secure

b) (Cross-Site) requests from Safari ARE getting tracked.
Sample from Mautic’s contact history:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15

c) However - while Chrome inspector correctly displays “None”, I too see “-” / “Unset” in Firefox and Safari. No idea why that is.

d)

In Safari and Firefox browsers this cookie attribute is not set, thus it is blocked.

Hmm, the header IS being sent, I doubt that the server is sending different headers for different browsers.

And again, afaik Chrome is the only one as of today to actually block cookies due to a new default for SameSite. Or maybe missed something?

what Safari version is this, exactly?

Hey there i am also using mautic intergrated into contao and my chrome browser is saying the same site attribute has not been set. What could be the issue. i have also noticed its not there when creating cookies in mautic https://test.mautic.dev.toughblue.com/mtc.js.

I’ve noticied tha same issue, cookie not getting set in safari browsers version 13 12 & 11 in IOS platforms

I’m using mautic 2.16.2 with php 7.3

cookie tracking works on android & windows devices with chrome version 80 and above. since fix for samesite=none for cross site is released in Mautic 2.16.

Any Idea how we can work around this issue for safari browsers, our users are largely coming from ios devices …

I still wonder what is going on there. All this smoothly for me .

@raian Just tested, in a cross-domain situation:
Mozilla/5.0 (iPhone; CPU iPhone OS 13_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Mobile/15E148 Safari/604.1
-> Works like charms, contact is tracked.

@kabengwa can’t confirm, “works for me”.

Common pitfalls:

  • Mautic version - needs to be 2.16.0 or higher
  • Blacklisting: Many people exclude their own IP from Mautic tracking, but (like me) sometimes forget about that.
  • No clean browser session (to make really sure: use fresh “incognito” browser window, hit the site, then - in a DIFFERENT browser - identify that hit in Mautic contacts and delete that contact)
  • Analysis: Use Chrome DevTools, not Safari (does not give full information)
  • Analysis: Most Mautic cookies exist twice - one with Mautic’s domain attached, one with the website’s. You need to look at the one with Mautic’s domain.

Please do give feedback about your findings!
Thanks a lot :slight_smile:
Ekke


Subscribe to the Mautic Podcast at www.Mauticast.com - and let me know what topics or interviews you would like to hear!
(German version at www.Mauticast.de)

I am using browser stack to test the same scenario, that way everytime a new clean session is created.

By the way, did you use emulator on chrome/firefox to test this use case of cookies issues or did you use real device(iOS).

NOTE: browserstack uses real devices , I read . that’s where i have tested this scenario and it is failing
mautic version 2.16.2 PHP 7.3

Hmm, I tried with my own, real, regular iPhone…

I have upgraded mautic to 3.0.2 and php 7.4

mautic cannot track users using cookies on third party landing pages. on iOS 13 with Safari browser

this issue is the since mautic.2.16 and not resolved

Hi there, we don’t support PHP 7.4 yet (see https://www.mautic.org/download/requirements) so recommend that you drop to 7.3 for the time being.

Some Github issues that might be related:

Yes, even with php 7.3 mautic cannot set cookies on third party pages. I thought this bug will be addressed and fixed in mautic 3

Hi,

even if all cookies are accepted, without any CORS problems and warnings, an IOS device is not successfully mapped with an iPhone Safari 13. The cell phone user is still tracked as an anonymous contact, although the previously entered data is successfully added to a known lead in Mautic.

I can confirm that when Mautic is running behind a HTTP/2 server, Safari will refuse all cookies placed with the tracking pixel HTTP request (GET /mtracking.gif). This is not related to Safari anti-tracking features or a CORS misconfiguration but to the non conformant HTTP response sent by Mautic for the tracking pixel. See the github issue mentioned above for details.

Safari is the only mainstream browser raising a HTTP/2 protocol error for the tracking pixel, and this includes refusing the Set-Cookie directives that come with it. This may explain the difficulties in reproducing the problem described in this thread. Knowing if Mautic is running behind a HTTP/2 server is a key element. This Safari problem exists in all Mautic versions running behind HTTP/2, but should disappear if HTTP/1.1 is used.