Solved

Safari mobile blocking call to _learnq.push?

  • 8 November 2022
  • 4 replies
  • 95 views

Badge +2

Hi everyone,

 

On the client side, we have some code that creates Klaviyo profiles by using Klaviyo’s javascript library via the _learnq.push(['identify', {'$email' : 'xyz@xyz.com'}]) call. 

 

When making the call on Chrome, everything works fine and a Klaviyo profile is created and _learnq.isIdentified() will now return true

 

On Safari mobile however, no profile is created and _learnq.isIdentified() simply returns false

 

Anyone else experiencing this and is this a known problem?

icon

Best answer by Brian Turcotte 30 December 2022, 20:01

View original

4 replies

Userlevel 7
Badge +30

Hi @SharonSTP and welcome back to the Community!

 

I haven’t heard of this issue before, but typically the behavior of an Identify call is the same across all browsers since the JS code is the same. 

 

May ask if you are self-testing this on your mobile Safari browser? If so, do you have Safari’s Cooker Tracker turned off? That could potentially cause issues with the profile creation. Another external cause could be Apple's ITP (Intelligent tracking prevention), which would limit cookie creation. 

 

If everything’s working properly on Chrome, I would suspect that the issue is occurring on Safari’s side which would mean it’s unlikely to be remedied from within Klaviyo, but investigating these questions might help identify the actual cause. I hope this helps to clarify, and thanks for being a Community member!

 

- Brian

Badge +2

Hi @Brian Turcotte , we can reproduce this by connecting our iPhone to a mac, loading up Safari on the desktop in dev mode and connecting to the mobile safari browser, navigating to the the website on the phone, and then triggering the JS call in the console.   On chrome it works fine, on safari, the call does absolutely nothing. 

 

You guys should be able to reproduce it if you do the same on any test website running klaviyo on your side as well.  Can you please have the engineering team look into this?  

 

As far as the settings on our browser, it’s whatever the default is on Mobile Safari,  If Klaviyo doesn’t function properly with the Apple’s default settings, then this problem is much bigger than us and a workaround needs to be put in place by you guys as it would essentially render Klaviyo non-functional on over 50% of devices out there.

 

Thanks for your help and your quick response -- looking forward to hearing back.

Badge +2

@Brian Turcotte I can confirm that this is also happening on shopper’s mobile iOS browsers as well where a client side call to _learnq.push(‘identify’...) for a new user that’s never signed up using a form, doesn’t work and doesn’t create a new klaviyo profile.  

Userlevel 7
Badge +30

Hi @SharonSTP!

 

My apologies for the delay in my response. I spoke with our engineering team and while this isn’t a widely known issue, I have submitted a request to have this investigated more thoroughly. I will update the thread as soon as I hear more.

 

Thanks again for using the Community!

-Brian

Reply