Overview
Klaviyo SMS is the text messaging marketing channel within the Klaviyo platform, built specifically for e-commerce businesses on Shopify, WooCommerce, BigCommerce, and similar platforms. It enables brands to collect mobile phone numbers through website pop-ups and inline forms, then send targeted promotional texts and automated transactional messages based on customer behavior and purchase history. Klaviyo SMS operates alongside Klaviyo Email as a unified customer engagement platform with shared subscriber profiles and behavioral data.
What This Script Does
Form Rendering and Phone Number Capture
- Loads JavaScript from
static.klaviyo.comand related Klaviyo CDN domains - Renders phone number capture interfaces: modal pop-ups, flyouts, embedded inline forms, and teaser bars
- Captures the visitor's phone number and explicit SMS consent on form submission
- Submits phone number, consent timestamp, and consent language to Klaviyo's subscriber API
- Script file:
https://static.klaviyo.com/onsite/js/klaviyo.js(same core script as Klaviyo Email)
Cookies Set
__kla_id— Klaviyo's primary cross-session visitor identifier; base64-encoded JSON containing$anonymousand$exchange_idkeys; first-party, persistent (2 years); links all browsing activity to a Klaviyo subscriber profile__kla_viewed_pages— tracks page view history within the session for triggering behavioral pop-ups__kla_ss— session identifier for Klaviyo's real-time personalization layer
Behavioral Tracking for SMS Automation
- Tracks page views (
Viewed Product,Viewed Category) for browse abandonment SMS triggers - Fires
Added to CartandStarted Checkoutevents for cart abandonment SMS flows - Monitors
Placed OrderandFulfilled Orderfor post-purchase SMS sequences - All events are piped into Klaviyo's customer profile, building a behavioral history used to trigger automated SMS messages
Attribution Tracking
- When recipients click links in SMS messages and land on the site, Klaviyo captures
_kxURL parameters andutm_source=klaviyoparameters to attribute the visit to the originating campaign - Click-through attribution creates a conversion record linking the SMS send to downstream purchases
Data Transmitted
- Visitor browsing events, cart activity, and purchase data sent to
a.klaviyo.comAPI endpoints - Phone numbers, consent records, and behavioral profiles stored on Klaviyo's US servers (AWS)
- Klaviyo participates in the EU-US Data Privacy Framework
Consent & Compliance
Consent category: Marketing
Klaviyo SMS is marketing technology. Under GDPR Article 6(1)(a) and Article 7, loading behavioral tracking scripts that build marketing profiles and enable targeted advertising requires explicit prior consent. The ePrivacy Directive requires consent for the __kla_id persistent cookie and the behavioral tracking scripts. Separately, SMS marketing in the EU requires explicit consent under ePrivacy Article 13 (direct electronic marketing) — this is a distinct consent from cookie consent. Under CCPA/CPRA, the behavioral data collected by Klaviyo (browsing history, cart activity, purchase patterns) linked to identifiable profiles constitutes "sharing" of personal information for targeted advertising, triggering "Do Not Sell or Share" opt-out obligations. Klaviyo must not load until valid marketing consent is obtained.
Should You Block This Without Consent?
Yes. Klaviyo SMS scripts track detailed browsing behavior, build persistent marketing profiles, and power targeted SMS advertising. Both the tracking cookies and the behavioral data collection require explicit marketing consent before the script loads.
Is Klaviyo SMS GDPR compliant?
Klaviyo SMS typically loads marketing trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Klaviyo SMS can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Klaviyo SMS, not on Klaviyo SMS itself.
Consent Categories
Also Known As
Industries
Frequently Asked Questions
Related Vendors
Manage consent for Klaviyo SMS
ConsentStack automatically detects and manages Klaviyo SMS trackers so your site stays compliant with global privacy regulations.