Fixes · Klaviyo profiles

Klaviyo profile properties missing when the page redirects straight after

The fix

A request that hasn’t gone out when the page navigates away can be dropped by the browser. Klaviyo’s _learnq identify is queued and sent a moment later, so one pushed straight before a redirect often never leaves.

Send the properties to Klaviyo’s client profiles endpoint with fetch(..., { keepalive: true }). The browser finishes a keepalive request even after the page has gone, and the redirect doesn’t wait for it.

01Why the browser drops the last request

On this Klaviyo Community thread (Jan 2022), properties sent with _learnq.push(['identify', ...]) from a form’s Submit button never reached the profile. The accepted answer fixed a typo and warned that “there may be a race condition of the form being submitted before your event listener has time to pass the data to Klaviyo.” The poster wrote back that they were “still having the problem”. When properties go missing only sometimes, look at timing.

  1. 01

    The page leaves before the call is sent

    MDN: when a page is about to unload, “the browser may choose not to send asynchronous XMLHttpRequest requests” (MDN, sendBeacon). A redirect to checkout straight after an identify call is that moment.

  2. 02

    It depends on the browser and the moment

    We tested it on 23 Oct 2026: a page sent a cross-site POST with a custom header, as Klaviyo’s client endpoints need, and moved to the next page in the same moment. Without keepalive, the request never reached our server in Firefox 150, and in WebKit 26.4, the engine behind Safari, it was lost in four runs out of five. In Chrome 148 it arrived every time, on a local connection. With keepalive it arrived every time in all three. So it can work on the developer’s machine and fail for a share of real visitors.

  3. 03

    Rule out the plain causes first

    A typo in the call, as in the thread above, or a property name that doesn’t match the one your flows and segments use. Those fail every time, not some of the time.

02Send the properties so they survive the redirect

For developers: send the properties with keepalive

This is the shape of what we shipped, generalised. It runs before the redirect and doesn’t hold it up:

Profile properties that survive the redirectjs
function saveProfileProperties(publicKey, email, properties) {
  return fetch(
    'https://a.klaviyo.com/client/profiles/?company_id=' + encodeURIComponent(publicKey),
    {
      method: 'POST',
      headers: { 'Content-Type': 'application/json', revision: '2026-10-15' },
      body: JSON.stringify({
        data: { type: 'profile', attributes: { email: email, properties: properties } },
      }),
      keepalive: true, // the browser finishes it after the page has gone
    }
  ).catch(() => {}); // never let this hold up the redirect
}

saveProfileProperties(KLAVIYO_PUBLIC_KEY, email, {
  quiz_q1: answers.q1,
  quiz_q2: answers.q2,
  campaign_src: source,
});
window.location.href = nextUrl;
  • The endpoint takes your public key: company_id is “Your Public API Key / Site ID”, and Klaviyo says “Never use a private API key with our client-side endpoints” (Klaviyo, Create or Update Client Profile).
  • Use the revision date shown on that page. It was 2026-10-15 when we checked (23 Oct 2026).
  • It will “Create or update properties about a profile”, so returning contacts get the properties too. It won’t change an existing profile’s email: for that “you must use a server-side endpoint authenticated by a private API key”.
  • MDN: “The body size for keepalive requests is limited to 64 kibibytes” (MDN, RequestInit). A few answers fit easily; don’t send files.
  • Not sendBeacon: it can’t add custom headers, and Klaviyo’s client endpoints require a revision header (Klaviyo, Create or Update Client Profile). For a request that needs to “change any request properties”, MDN points to fetch with keepalive (MDN, sendBeacon).
  • Keep Klaviyo’s own script on the page for its onsite tracking. Its newer klaviyo object replaces _learnq, and klaviyo.identify() returns a Promise (Klaviyo, the klaviyo object). The page says it resolves “when an identify call has been completed”, but not whether Klaviyo has the data by then, and waiting on it would hold up the redirect, so we didn’t use it here.

03Watch the request, then read the profile

  1. Watch the request go

    In Chrome’s developer tools, open the Network tab and tick Preserve log, then go through the form. A POST to a.klaviyo.com/client/profiles/ should show status 202, even though the page has moved on.

  2. Look at the profile

    In Klaviyo, open the profile for the email you used. The properties should be there with the values you chose.

  3. Repeat with an email that already has a profile

    The properties should be added to that profile too.

  4. Test in Safari and Firefox

    Those are the browsers where the request without keepalive was lost in our test.

From our work

04Thameen London’s sample quiz

Thameen London, the luxury fragrance house we moved onto Shopify in March 2026, ran a sample campaign: a short quiz, then a sample with a single-use code, straight to checkout. The quiz answers and where the visitor came from were meant to land on each person’s Klaviyo profile.

What we saw. The answers were missing from some profiles and not others, more often on contacts Klaviyo already had, such as a returning visitor from an ad. The code sent them with a _learnq identify, then sent the shopper on to checkout straight away.

The fix (1 Jul 2026). The answers now go to Klaviyo’s client profiles endpoint with keepalive, without holding up the redirect, and the request returned 202 from the browser. The _learnq identify stays, for Klaviyo’s onsite tracking.

  • In our log“Sample quiz answers no longer go missing from email marketing profiles”

The bigger picture

05Anything sent as the page moves on

Anything sent in the moment before a page changes can go missing: tracking events, sign-ups, saved answers. If data arrives for some people and not others, look at what the page does straight after sending it.

Sign-ups and profiles that hold up are part of our support work. Our post on a Klaviyo form that says thanks but adds no one covers the other common gap.

06Sources

Every step and claim above comes from one of these, or from the fix on the store it describes.

  1. Klaviyo developers: Create or Update Client Profile
  2. Klaviyo developers: Introduction to the klaviyo object
  3. MDN: RequestInit (keepalive)
  4. MDN: Navigator.sendBeacon()
  5. Klaviyo Community: Unable to write custom properties to profiles using Identify API (Jan 2022)

Sources checked on .

Contact

Data missing from some profiles?

Tell us what should land on each profile, and what the page does straight after.