How To Link Email & SMS Opt-In Submissions to Klaviyo User Profiles

Ensure your abandoned cart flows work as expected when collecting email & SMS via popups

How To Link Email & SMS Opt-In Submissions to Klaviyo User Profiles

Brad Redding

Brad Redding is the Founder & CEO of Elevar. Specializing in analytics, tracking, GTM, and conversion optimization.

Klaviyo is a critical part of most merchants infrastructure. Klaviyo relies almost exclusively on getting the users email to track their sessions.

When a merchant uses a Klaviyo form to get a users email, there are typically no problems (and you can likely ignore the rest of this article).

However, some merchants choose to use an Attentive pop up to collect emails. When this happens, it’s not guaranteed that their email submission is pushed through to Klaviyo, preventing Klaviyo from tracking the user.

Here’s an example:

There’s a high probability that you have some type of popup on your site collecting email or phone numbers:


And chances are this popup is powered by one of the following:

  • Attentive
  • Postscript
  • BounceX
  • Recart
  • Privy
  • etc..

You hope that the following happens:

  1. User enters email on your website
  2. The user’s email email AND site activity (product view, add to cart events) is connected to their Klaviyo profile

So if a user abandons their cart then your Klaviyo abandoned cart flow email will trigger.

But here’s what happens for some sites:

  1. User enters email
  2. Their email is imported to Klaviyo to create a new profile, but onsite activity is not sent to Klaviyo

This means abandoned product view or add to cart flows don’t trigger.

There are two ways to test that your site is working as expected:

The Old Fashioned Non-Technical Way

Go to your site incognito, enter an email that doesn’t exist in Klaviyo, navigate your site, add items to cart etc.

Then log into your Klaviyo dashboard and pull up your user profile.

If the connection is broken then you’ll see something like this:

klaviyo activity

Notice how there are no “Active on Site”, “Viewed Product”, or “Added to Cart” metrics.

If the connection is working then you’ll see these metrics listed and you don’t have any issues.

The Technical Way

Maybe you don’t have access to Klaviyo or are more technical.

Here’s how to validate:

  1. Go incognito or delete your Klaviyo cookies
  2. Open your developer console in browser
  3. Go to Network tab
  4. Signup for your email popup offer
  5. Navigate around site
  6. Do you see a “track” and “identify” call as shown in screenshot below?

dev console

If yes then you’re good to go.

If no then your connection is broken.

Here’s another technical method to try:

  1. Clear the cookies in your browser for the particular site
  2. Call _learnq.isIdentified() in the console and ensure it returns false
  3. Submit your email in the Attentive form
  4. Call _learnq.isIdentified() again and seeing whether it returns true. If it does return true, **nothing should be required and the problem isn’t occuring.**

How To Fix Issue

This will depend on your popup provider.

Ideally they have this built into their popup function for you.

But if not then you can fix via Google Tag Manager.

I’ll use Attentive as an example:

  1. Contact Attentive at [email protected] and ask them to push email and sms signup events to the data layer
  2. Import our Attentive x Klaviyo Identify Pre-Built Container from your Elevar dashboard to your GTM Web Container*
  3. Publish
  4. Re-test via one of the above methods

* Code to connect Attentive signups to Klaviyo profiles is available in our prebuilt Klaviyo container. Ensure that the event Attentive builds matches the code in the container. If not, you’ll need to tweak the container code (variables, trigger) to match the event name Attentive uses, and tweak the data layer variable values to make sure they line up with what’s in the event.

Here’s the code that the pre-built tag contains:

// Event to be pushed to Klaviyo once email is acquired
_learnq.push(['identify', {
'$email': '[email protected]',
'$phone_number': '780-951-0000', // IF AVAILABLE
'$first_name': 'First_name', // IF AVAILABLE
'$last_name': 'Last_name' // IF AVAILABLE

Once fixed then your abandoned cart flows will work as you hope for them to and make more $$$.

If you’re technical and want to QA you can try this:

After you’ve installed our pre built container, had the email submission event added to the site by emailing Attentive, and made sure the pre built container event matches the event name and variable values from Attentive, you can QA your work by doing the folllowing

  1. Clear all browswer cookies
  2. Run _learnq.isIdentified() in the console → should return false
  3. Trigger the Attentive form and submit your email
  4. Run _learnq.isIdentified() → should return true
  5. If true is returned after the email submission it all worked!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like