CookieDetox Legal-Tech Observatory
Sanctions & Amendes 2026-09-19

Klaviyo & Omnisend: Consent Requirements for Abandoned Cart Tracking & Web Identification

CD

Par Cellule Investigation CookieDetox

Expertise Juridique & Conformité

🔗
T

L'essentiel Ă  retenir (En bref)

Under ePrivacy Directive ↗ Art. 5(3) and GDPR Art. 6(1)(a), deploying Klaviyo or Omnisend onsite behavioral trackers (`klaviyo.js`, `__kla_id`) and reconciling anonymous browsing via email tracking parameters (`_kx`) requires prior, granular consent. This process constitutes behavioral profiling under GDPR Art. 4(4). Newsletter opt-in does not authorize web identification, rendering unconsented abandoned cart tracking unlawful and subject to penalties under GDPR Art. 83.

Executive Technical Brief: The Anatomy of Covert Behavioral Attribution

E-commerce platforms frequently rely on automated retention sequences powered by Customer Data Platforms (CDPs) and marketing automation tools like Klaviyo and Omnisend. The standard revenue recovery model hinges on cart abandonment and browse abandonment sequences. However, marketing teams routinely misclassify the technical architecture governing these automated triggers as "strictly necessary" functional operations or legitimate business interests under Article 6(1)(f) of the General Data Protection Regulation (GDPR).

This classification is legally invalid and technically inaccurate. The moment an automation tool reconciles an anonymous web browsing session with a known individual email address via a local device identifier, it executes an operation subject to two distinct statutory regimes: Article 5(3) of the ePrivacy Directive ↗ 2002/58/EC (transposed across EU member states, including France via Article 82 of the French Data Protection Act ↗) and Article 6 of the GDPR.

The Core Conflict: Newsletter Consent vs. Device-Level Profiling

A consumer subscribing to an email newsletter agrees solely to receive direct commercial communications under applicable domestic marketing rules. That transaction does not provide legal authorization under GDPR Article 4(11) to plant persistent trackers on their endpoint terminal or execute automated cross-session behavioral profiling (GDPR Article 4(4)).

When a subscriber opens an email and clicks a link, Klaviyo appends a cryptographic hash parameter (the _kx tracking parameter) to the query string. The client-side script parses this parameter, assigns a persistent first-party cookie (__kla_id), and systematically bridges historical and future anonymous page hits, catalog views (Viewed Product), and add-to-cart events (Added to Cart) to the CRM profile. Executing this sequence without prior, freely given, specific, informed, and unambiguous consent directly violates European privacy jurisprudence, including CJEU Case C-673/17 ↗ (Planet49) and CNIL Deliberations 2020-091 and 2020-092.

Architectural Deep Dive: The Mechanics of __kla_id and the _kx Parameter

To understand the regulatory breach, one must isolate the underlying network activity. The standard Klaviyo deployment relies on an inline loader or an enterprise tag management container (Google Tag Manager) loading https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=COMPANY_ID.

The Re-identification Pipeline

  1. Outbound Attribution: An outbound marketing email contains an anchor tag such as https://brand.com/products/item?_kx=J8dKl2a9Z.... The _kx value is a Base64-encoded, encrypted token encapsulating the user's Klaviyo internal profile ID or raw email identity.
  2. Cookie Ingestion & Mutation: Upon landing, klaviyo.js parses window.location.search. It extracts _kx, reads or writes the first-party cookie named __kla_id, and sets its expiration to 730 days (2 years).
  3. State Persistence: The __kla_id cookie stores a JSON payload containing an anonymous device identifier alongside base-level attribution state:
// Decoded structure of a persistent __kla_id local payload
{
  "$exchange_id": "01HX5T3Y8K8QZ9R7W6P4M2N1AB",
  "$email": "shopper@enterprise.eu",
  "$views": 14,
  "$last_view": 1726743600
}

Behavioral Event Payloads

Subsequent browsing generates immediate tracking beacons dispatched via HTTP POST requests to Klaviyo's ingestion endpoint (https://a.klaviyo.com/api/onsite/v1/track). When an end-user navigates through items, the platform fires un-throttled payloads capturing detailed behavioral trails without the customer authenticating via an account login:

// Forensic trace of an unauthorized 'Viewed Product' POST dispatch
fetch("https://a.klaviyo.com/api/onsite/v1/track", {
  "method": "POST",
  "headers": {
    "Accept": "*/*",
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
  },
  "body": new URLSearchParams({
    "data": JSON.stringify({
      "token": "PUBLIC_API_KEY",
      "event": "Viewed Product",
      "customer_properties": {
        "$exchange_id": "01HX5T3Y8K8QZ9R7W6P4M2N1AB"
      },
      "properties": {
        "$source": "shopify",
        "Title": "Cashmere Winter Coat",
        "Price": 495.00,
        "Tags": ["Outerwear", "Luxury"],
        "URL": "https://brand.com/products/cashmere-coat"
      }
    })
  })
});

Because these dispatches occur client-side without validating consent state via a Consent Management Platform (CMP), the terminal undergoes read/write storage access forbidden by ePrivacy Art. 5(3), unless strictly necessary for delivering a service explicitly requested by the subscriber. An abandoned cart email triggered by passive browsing does not satisfy the "strictly requested" test, as settled by EDPB Guidelines 2/2023 on the technical scope of Art. 5(3).

Regulatory & Legal Risk Matrix: Klaviyo & Omnisend Processing Activities

E-commerce operators commonly conflate basic checkout abandonment recovery (where a user explicitly enters an email in a checkout funnel and abandons at step 3) with passive browse abandonment tracking triggered via cookies. European data protection authorities explicitly distinguish between these mechanisms based on the legal basis invoked and the necessity of terminal storage access.

Automation Sequence Tracking Vector Statutory Basis (ePrivacy / GDPR) Legal Assessment Enforcement Exposure
Passive Browse Abandonment _kx param + __kla_id cookie + Viewed Product Art. 5(3) ePrivacy / Art. 6(1)(a) Consent Strictly illegal without prior affirmative opt-in via CMP. High: CNIL sanctions (Art. 82), Art. 83 GDPR ↗ up to €20M or 4% turnover.
Unauthenticated Cart Abandonment Client-side Added to Cart + cached identity Art. 5(3) ePrivacy / Art. 6(1)(a) Consent Requires explicit consent for "Marketing/Profiling Cookies". High: Systematic invalidation of legitimate interest defence.
Checkout Step 1 Abandonment Direct form-input capture (Backend API session) GDPR Art. 6(1)(b) Contract or 6(1)(f) Legitimate Interest Defensible ONLY if local cookies are not read/written without consent. Moderate: Requires clear pre-collection notification.
Historical CRM Synchronization Database reconciliation via hashed email matching GDPR Art. 6(1)(a) Consent / Art. 21 Right to Object Profiling requires specific consent under EDPB Guidelines 8/2020. High: Civil liability under GDPR Art. 82 (material/non-material damages).

The Failure of the "Legitimate Interest" Exemption

Corporate legal departments routinely attempt to shield Klaviyo or Omnisend track scripts under Art. 6(1)(f) GDPR. The CJEU explicitly refuted this posture in Fashion ID (C-40/17), determining that commercial performance optimization does not supersede consumer rights where tracking technologies are placed prior to unambiguous consent.

Furthermore, under CNIL Deliberation 2020-092, operations that track individuals across different sessions and correlate external identifiers (such as CRM contact keys) fail the proportionality test for legitimate interest, automatically mandating an ePrivacy opt-in mechanism before tag execution.

Implementation & Forensic Verification Protocol: Remediation Architecture

To neutralize regulatory exposure while preserving tracking for consenting users, technical teams must overhaul the client-side tag initialization architecture. Klaviyo must never load unconditionally on the DOMContentLoaded or window.load events.

Phase 1: Conditional GTM Blocking & Cookie Disabling

When implementing Klaviyo or Omnisend through Google Tag Manager, ensure that the Base Tag does not fire on a generic Page View trigger. The tag must bind strictly to a Consent Management Platform (CMP) custom event validating marketing authorization (e.g., Didomi, OneTrust, Axeptio, Usercentrics).

<!-- Forensic CMP Integration: Blocking Klaviyo Execution Until Explicit Consent -->
<script>
window.addEventListener('didomi-consent', function(event) {
  var consentStatus = window.Didomi.getUserConsentStatusForVendor('c:klaviyo-XXX');
  
  if (consentStatus === true) {
    // Dynamically inject klaviyo.js only after verified marketing consent
    if (!window.klaviyo) {
      var klaviyoScript = document.createElement('script');
      klaviyoScript.type = 'text/javascript';
      klaviyoScript.async = true;
      klaviyoScript.src = 'https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=YOUR_PUBLIC_KEY';
      document.getElementsByTagName('head')[0].appendChild(klaviyoScript);
    }
  } else {
    // Actively purge unauthorized identifiers if consent is revoked
    document.cookie = "__kla_id=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=." + window.location.hostname;
  }
});
</script>

Phase 2: Sanitizing URL Ingestion (_kx Parameter Decoupling)

If a visitor clicks an email link containing _kx but rejects marketing cookies on your site, klaviyo.js must not execute, preventing the parameter from being bound to local storage. If native Shopify plugins are used, the liquid theme template must be hard-coded to intercept tracking logic:

// Shopify Liquid Theme Conditional Wrapper
// File: snippets/klaviyo-gatekeeper.liquid
(function() {
  var hasMarketingConsent = function() {
    // Check Shopify Customer Privacy API or CMP status
    if (window.Shopify && window.Shopify.customerPrivacy) {
      return window.Shopify.customerPrivacy.getTrackingConsent() === 'yes';
    }
    return false;
  };

  if (!hasMarketingConsent()) {
    // Intercept and strip _kx parameter from DOM state without triggering attribution
    if (window.location.search.indexOf('_kx=') !== -1) {
      var cleanSearch = window.location.search
        .replace(/([&?])_kx=[^&]+(&|$)/, '$1')
        .replace(/&$/, '')
        .replace(/^\?$/, '');
      var cleanUrl = window.location.pathname + (cleanSearch ? cleanSearch : '') + window.location.hash;
      window.history.replaceState(null, '', cleanUrl);
    }
  }
})();

Phase 3: Forensic DevTools Audit Protocol

To verify compliance, execute the following audit in an incognito session:

  1. Open Chrome DevTools (F12) > Network tab > Filter by klaviyo.
  2. Navigate to your store using an outbound email link containing an arbitrary token: https://brand.com/?_kx=TEST_TOKEN_DEBUG.
  3. Pass Criteria 1: Zero requests to static.klaviyo.com or a.klaviyo.com prior to clicking "Accept" on your cookie banner.
  4. Check the Application tab > Cookies.
  5. Pass Criteria 2: The cookie __kla_id must not exist in storage.
  6. Click "Reject All" on your cookie banner.
  7. Pass Criteria 3: Navigating through catalog pages must generate zero track API calls. No Viewed Product beacons should appear in the Network tab.

Strategic Verdict: Zero-Penalty Behavioral Retargeting Architecture

E-commerce brands operating in the EU face an aggressive regulatory environment. Supervisory authorities, including the CNIL, DPC, and German State Commissioners (LfDI), deploy automated crawling engines to detect device-fingerprinting and unauthorized tracking tokens. Continuing to use unconsented browse and cart abandonment tracking relies on an unsustainable legal fiction.

The Compliant Blueprint

To retain high recovery conversion rates while achieving absolute regulatory compliance, enterprise brands must implement a dual-track architecture:

By enforcing client-side script gating and actively stripping the _kx tracking parameter when consent is refused, digital merchants systematically eliminate exposure to administrative fines under GDPR Art. 83, eliminate vulnerability to consumer class-action suits under Art. 82, and retain audit-ready compliance documentation across all European jurisdictions.

§

Official Legal Sources & Authoritative Decisions

Primary statutory texts, official DPA rulings, and European court judgments referenced in this analysis.

  • Curia / CJUE CJEU Fashion ID Judgment (Case C-40/17): Joint liability for social plugins and third-party trackers
    View primary text
  • Curia / CJUE CJEU Planet49 Judgment (Case C-673/17): Strict ban on pre-ticked consent checkboxes
    View primary text
  • LĂ©gifrance Article 82 of French Data Protection Act (Transposition of ePrivacy Directive in France)
    View primary text
  • EUR-Lex Article 83 GDPR — General conditions for imposing administrative fines (statutory ceiling up to €20M or 4% turnover)
    View primary text
  • EUR-Lex Directive 2002/58/EC (ePrivacy Directive on Privacy and Electronic Communications)
    View primary text
Updated 2026-09-19
Share this article:

Frequently Asked Questions (FAQ)

Does abandoned cart tracking require cookie consent under the GDPR?

Yes. When abandoned cart tracking relies on client-side scripts (such as klaviyo.js) or device cookies (__kla_id) to monitor browsing and link it to an email address, it requires prior consent under ePrivacy Directive Art. 5(3) and GDPR Art. 6(1)(a). It cannot rely on legitimate interest.

Can I track browse abandonment if the user already subscribed to my newsletter?

No. Subscribing to a newsletter only covers direct marketing via email. It does not grant legal permission under GDPR Art. 4(11) to plant tracking cookies, monitor product page views, or execute behavioral profiling across browsing sessions without separate, explicit cookie consent.

How do I block Klaviyo tracking before consent in Shopify?

You must avoid the standard unconditioned app integration. Wrap the Klaviyo initialization script inside Shopify's Customer Privacy API listener or your CMP's consent callback. Only inject klaviyo.js and execute event tracking when the marketing consent category resolves to granted.

What is the __kla_id cookie, and why is it regulated by the CNIL?

The __kla_id cookie is a first-party tracking cookie set by Klaviyo that persists for up to two years. It stores a unique profile identifier to track catalog views and cart additions across visits. Because it accesses terminal device storage for behavioral profiling, the CNIL classifies it as requiring prior opt-in.