Skip to main content
Solved

Inconsistencies with _learnq.push


sarah.lauden
Contributor I
Forum|alt.badge.img+2

I have a popup on my site that a lot of people sign up through as their first interaction with us. With it, I am also updating some properties about them based on which URL they are on. I’m playing with the code, but its roughly something like this...

window.addEventListener("klaviyoForms", function(e) {
      if (e.detail.type == 'submit') {
         _learnq.push(['identify', {'code' : 'x'}]);
      }
});

For some reason, some people are coming in beautifully, with the code, as well as the “Where they first found you” data and everything. Others are not.

 

What would break the “Where they first found you” … 

  • is this all dependent on cookies or something?
  • are there specific issues with first time visitors?

Best answer by sarah.lauden

I got my code working!

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

sarah.lauden
Contributor I
Forum|alt.badge.img+2
  • Author
  • Contributor I
  • 2 replies
  • Answer
  • March 2, 2021

I got my code working!


caroline
Forum|alt.badge.img+8
  • Klaviyo Alum
  • 215 replies
  • March 8, 2021

Hi @sarah.lauden,

Happy to hear you were able to get your code working! Would you be able to share what change(s) you made? This information will be super helpful to other Klaviyo users who may stumble upon this post in the future.

Best,

Caroline