klaviyo / magento2-extension
klaviyo/magento2-extension
Klaviyo extension for Magento 2. Allows pushing newsletters to Klaviyo's platform and more.
Klaviyo for Magento 2
Features
- Identifies users
- Tracks viewing an item (catalog product)
- Saves checkout emails
- Sync Newsletter Subscription / Unsubscription to a Klaviyo List
- Abandoned Cart information
- OAuth Integration Configuration
For detailed information on Klaviyo extension for Magento 2, visit the Klaviyo Help center
Contributing
We appreciate any and all contributions to this project! Before creating an issue
or raising a PR, review our Contributing guide. This guide
reviews issue creation, prerequisites for pull requests, and more.
Prerequisites
Installation and Setup of the Klaviyo extension for Magento 2
- Follow this article in our Help Center
Code of Conduct
Read our Code of Conduct to keep our community approachable
and respectable. Klaviyo has a "no brilliant jerks" policy, and this extends to
our open source projects.
Internal
For internal documentation links, please review the Internal
documentation.
Support
Contact [email protected]
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
Unreleased
5.0.0 - 2026-05-29
Added
- WhatsApp consent collection at checkout via a new unified Mobile consent group. Merchants choose to collect consent for SMS, WhatsApp, or both, and a single mobile checkbox at checkout drives per-channel subscriptions in Klaviyo.
Changed
- Replaced the SMS consent admin group with a unified Mobile group. Existing SMS settings are migrated to the new paths on upgrade; custom label and disclosure copy is preserved.
- Consent submission at order placement now uses the V3 /api/profile-subscription-bulk-create-jobs/ endpoint instead of the legacy custom webhook.
- Phone numbers collected at checkout are now normalized to E.164 before being sent to Klaviyo.
Removed
- Support for PHP versions below 8.1. The plugin now requires PHP 8.1 or later, aligning with Magento 2.4.5+. Merchants on PHP 7.x must upgrade their PHP runtime before installing this release.
4.4.4 - 2026-04-30
Changed
- Update Klaviyo V3 API revision to 2026-04-15.
Fixed
- Fixed race condition for adding profiles to a list, retries subscription if we attempt to create a profile that already exists.
4.4.3 - 2026-02-17
Added
- Adds AddedItemImageUrl to Added To Cart event payload
Fixed
- Added fallback image selection for Added To Cart events to fix cases where there is no "small_image" set on the product. This greatly reduces the possibility that "AddedItemImageUrlKey" will be set to null or "no_selection"
4.4.2 - 2025-11-04
Changed
- Update Klaviyo V3 API revision to 2025-10-15
Added
- Add isKlaviyoEnabled to product/viewed.phtml.
Fixed
- Ensure Controller/Checkout/Email.php loads proper classes on frontend.
4.4.1 - 2025-09-15
Fixed
- Removes escapeJs call that was preventing Viewed Product events from syncing successfully in 4.4.0
4.4.0 - 2025-08-11
Added
- Add 'kl_parent_ids' extension attribute in product requests.
Fixed
- null argument to str_replace() caused by getPrice() fallback return of null instead of "0".
4.3.1 - 2025-05-09
Fixed
- BUGPORT-8326: Formatted $value field in Viewed Product snippet causes API error in latest extension.
4.3.0 - 2025-04-16
Added
- Add 'external_catalog_id' and 'integration_key' to Viewed Product and Added To Cart events.
- Adds 'value' field to Viewed Product events
Changed
- Bumps Klaviyo API revision to 2025-04-15
Fixed
- Fixed Deprecated use of base64_encode in Observer/SalesQuoteSaveAfter.php
- Fixed profile identification on checkout page
- Fixed edge case attempting to get product images when product is null
4.2.0 - 2024-09-17
Added
- Adds StoreId field to Viewed Product events
Changed
- Updated the klaviyo onsite javascript to the new url format
Fixed
- Removes call to isLoggerEnabled() in Logger __construct to address "Area Code is already set" issue when running consumer-based jobs
4.1.4 - 2024-05-22
Changed
- Updated Added to Cart events to show preference to simple product images over configurable product images.
- Added StoreId and SimpleProductId fields to Added to Cart event.
Fixed
- Properly encodes emails before search request to Klaviyo
- Updated KlaviyoV3Api to fix the profile properties sent in events to match the format required the V3 API
4.1.3 - 2024-03-29
Fixed
- BUGPORT-1750: unassigned $response variable from api call during list subscription
4.1.2 - 2024-01-31
Fixed
- Updated customer.js to correctly handle promise returned from isIdentified
- Updated KlaviyoV3Api to handle new response patterns returned from V3 APIs
- Fixed issue with Added to Cart events not syncing for multi-site configurations
- Fixed Added to Cart observer to check for private key instead of public key
- Fixed error handling from V3 APIs, logs out the error message instead of the stack trace on retries.
4.1.1 - 2023-12-12
Added
- Added name to initialize block in checkout
- Added ACL rules for Klaviyo extension configuration.
Changed
- Changed system.xml sort to stop becoming default instead of core options
Fixed
- Updated getKlaviyoLists() exception handling to properly print error message.
- Paginate to get all lists for account.
- Updated response handling in KlaviyoV3Sdk to not retry for falsey responses from curl_exec.
4.1.0 - 2023-09-29
Added
- New Klaviyo onsite object
- New X-Klaviyo-User-Agent to headers to collect plugin usage meta data
- Added support for Klaviyo V3 API
Removed
- Support for V2 APIs: /track and /identify
- Removed _learnq onsite object in favor of klaviyo object
4.0.12 - 2023-07-20
Fixed
- Fixed issue when viewed product block on product page caused slower response time
- Fixed issue for newletter module where new subscriptions weren't being sent to klaviyo via magento forms for stores using Magento version < 2.4.3
4.0.11 - 2023-04-07
Changed
- Fixed bug where historical sync wouldn't run for index of 0
Fixed
- Fixed bug in checkout where shipping information update caused report error if email or sms consent where activated
- Fixed PHP 8.2 incompatability with dynamic properties
4.0.10 - 2023-03-01
Added
- Continuous integration to validate pre commit, validate our versioned files, and prepare for testing
- Continuous deployment to generate a new release when PRs are merged into the 'stable/**' release branches.
Removed
- Empty test files
Changed
- Added precommit to the repository and formatted all PHP files to PSR12 style.
- Set the newsletter subscription source to Magento 2
Fixed
- Fixed bug in NewsletterSubscribeObserver where customers with an unconfirmed site account were being unsubscribed
4.0.9 - 2023-01-03
Changed
- Updated default SMS consent language
Fixed
- Fixed bug in logging for truncated payloads in the kl_syncs table.
4.0.8 - 2022-11-10
Fixed
- Fixed bug where cleanup cron wasn't referencing correct method name.
4.0.7 - 2022-11-01
Added
- Add a name to the Klaviyo\Reclaim\Block\Initialize block, so it can be moved around via a layout xml
Fixed
- Fixed bug in Observer/SalesQuoteProductAddAfter.php passing null value to stripslashes
- Fixed bug in Block/Catalog/Product/ViewedProduct.php passing null value to number_format
- Fixed issue when Controller/Checkout/Reload.php was loading backend classes on frontend
- Fixes for Added to Cart: adds error handling to Added to Cart event processing, enforces payload size to 65k characters, adjusts cleanup crons to include failed syncs
4.0.6 - 2022-09-19
Fixed
- Updated PHPDoc parameters for productinspector method in Api/ReclaimInterface.php to match signature.
4.0.5 - 2022-07-28
Fixed
- Fix 404 AJAX Request on /cart/reclaim/checkout/reload
- Fixed newsletter signup on account creation. Users will now be subscribed if they check the checkbox on account registration.
4.0.4 - 2022-05-24
Deprecated
- Skipped 4.0.3 due to cancelled extension in magento marketplace
Fixed
- Moved webhooks url to async tier
- Removed product descriptions from Added to Cart payloads
- Add indexType to db_schema.xml
- Added style-src and forms url to csp_whitelist.xml
4.0.2 - 2022-03-15
Fixed
- Updated Added to Cart track request to use POST to accommodate large payloads
- Initialized observerAtcPayload to fix Undefined property error
4.0.1 - 2022-01-28
Fixed
- Add store scoping to Track Requests for Added to Cart
4.0.0 - 2022-01-20
Added
- Declarative schema, patch data scripts available for backward compatibility
Removed
- InstallData/UpgradeData and InstallSchema/UpgradeSchema scripts
Fixed
- Whitelisting Klaviyo onsite scripts
- Identifying logged-in users correctly
4.0.0-beta - 2021-12-15
Added
- Added to Cart metric collection
3.0.11 - 2021-12-21
Fixed
- Error affecting customers using Magento's embedded footer forms
3.0.10 - 2021-11-10
Changed
- SMS Consent default language
3.0.9 - 2021-09-21
Fixed
- SMS Consent checkbox for logged in users with default address set
- URL construction works when store URL has subdirectories
- Remove reference to deprecated _learnq functionality
3.0.8 - 2021-09-02
Fixed
- Fixes infinite loop issue produced by Magento bug
3.0.7 - 2021-08-27
Fixed
- Right trim trailing slash from Custom Media Url setting from Klaviyo Extension
- Properly escape the public api for onsite tag
- Handle newsletter subscriptions in all areas
- Fixing bug with newsletter subscribes for anonymous users (not registered accounts)
3.0.6 - 2021-07-01
Added
- Add an ability to pass the Store ID during track event
Fixed
- Keep existing extension attributes when extending shipping payload request
3.0.5 - 2021-06-08
Added
- Updates composer requirement to use module quote >=101.1.3
- Add ability to retrieve config values for specified store id
Fixed
- Fix issue with newsletter subscription
3.0.4 - 2021-06-08
Fixed
- Use
Magento\Framework\Api\SearchResultsto support Magento 2 versions 2.3.0 to 2.3.3
3.0.3 - 2021-06-01
Added
- OAuth observer to create Magento2 Integration OAuth configuration
Removed
- Section about Setup Klaviyo User
3.0.2 - 2021-05-26
Fixed
- Missing quote in module
3.0.1 - 2021-05-26
Fixed
- Typo in cart rebuild constructor di
3.0.0 - 2021-05-25
Added
- Only support Magento 2.3.* +
Fixed
- Utilize masked quote ids.
- Extend cart/search getList api to contain masked Ids.
2.2.0 - 2021-05-17
Fixed
- Update checkout to not use quote for rebuilding
2.1.1 - 2021-05-17
Fixed
- Use store ids instead of website ids in the ProductDeleteBefore Observer
- Check for versions older than 2.0.0 in UpgradeSchema
2.1.0 - 2021-03-22
Added
- SMS Consent at checkout
- Email consent at checkout
- Consent at checkout admin tab
Fixed
- Email consent now recorded when Klaviyo list opt-in settings are used
- Escaped html for public api key
2.0.0 - 2021-01-11
Added
- Product delete observer webhook to send to Klaviyo catalog
- Webhook secret form field for webhook validation
Changed
- Removed csp setting
- Removed csp mode from config.xml
- Added a.fast.klaviyo.com to img-src csp whitelist
1.2.4 - 2020-12-01
Added
- Create CHANGELOG.md
Changed
- Update to README.md to share contribution guidelines
- Use List API V2 for fetching newsletter lists
Fixed
- Remove JQuery UI as a dependency since it is unused
1.2.3 - 2020-10-09
Changed
- Removes unused variable and DI from Reclaim.php
- CSP now uses report-only mode
NOTE
- The CHANGELOG was created on 2020-11-20 and does not contain information about earlier releases
| Version | Stability | QA Status | Released |
|---|---|---|---|
| 5.0.0 | stable | Fail | 2026-05-29 16:38:30 |
| 4.4.4 | stable | Not tested | 2026-04-30 20:07:10 |
| 4.4.3 | stable | Not tested | 2026-02-18 16:08:59 |
| 4.4.2 | stable | Not tested | 2025-11-05 20:52:05 |
| 4.4.1 | stable | Not tested | 2025-09-15 20:20:39 |
| 4.4.0 | stable | Not tested | 2025-09-04 12:06:20 |
| 4.3.1 | stable | Not tested | 2025-05-12 13:42:35 |
| 4.3.0 | stable | Not tested | 2025-04-22 13:45:54 |
| 4.2.0 | stable | Not tested | 2024-09-24 14:21:36 |
| 4.1.4 | stable | Not tested | 2024-05-23 17:52:25 |
| 4.1.3 | stable | Not tested | 2024-03-29 20:00:57 |
| 3.0.11-patch | stable | Not tested | 2024-02-08 21:24:42 |
| 3.0.4-patch | stable | Not tested | 2024-02-06 22:01:52 |
| 2.2.0-patch | stable | Not tested | 2024-02-06 21:42:44 |
| 4.1.2 | stable | Not tested | 2024-01-31 19:41:54 |
| 4.1.1 | stable | Not tested | 2023-12-13 18:53:40 |
| 4.1.0 | stable | Not tested | 2023-09-29 19:27:53 |
| 4.0.12 | stable | Not tested | 2023-07-20 22:48:08 |
| 4.0.11 | stable | Not tested | 2023-04-10 15:51:24 |
| 4.0.10 | stable | Not tested | 2023-03-02 16:59:04 |
| 4.0.9 | stable | Not tested | 2023-01-03 22:03:52 |
| 4.0.8 | stable | Not tested | 2022-11-10 21:06:57 |
| 4.0.7 | stable | Not tested | 2022-11-01 23:27:51 |
| 4.0.6 | stable | Not tested | 2022-09-19 19:09:38 |
| 4.0.5 | stable | Not tested | 2022-07-28 21:30:02 |
| 4.0.4 | stable | Not tested | 2022-05-24 21:09:09 |
| 4.0.2 | stable | Not tested | 2022-03-16 18:37:47 |
| 4.0.1 | stable | Not tested | 2022-02-02 00:10:17 |
| 4.0.0 | stable | Not tested | 2022-01-20 12:57:54 |
| 3.0.11 | stable | Not tested | 2021-12-21 15:51:52 |
| 4.0.0-beta | beta | Not tested | 2021-12-15 17:27:31 |
| 3.0.10 | stable | Not tested | 2021-11-16 02:04:17 |
| 3.0.9 | stable | Not tested | 2021-09-22 20:51:07 |
| 3.0.8 | stable | Not tested | 2021-09-09 17:16:38 |
| 3.0.7 | stable | Not tested | 2021-08-30 14:39:06 |
| 3.0.6 | stable | Not tested | 2021-07-01 17:22:18 |
| 3.0.5 | stable | Not tested | 2021-06-08 20:23:48 |
| 3.0.4 | stable | Not tested | 2021-06-08 18:37:41 |
| 3.0.3 | stable | Not tested | 2021-06-02 11:38:05 |
| 3.0.2 | stable | Not tested | 2021-05-26 16:57:46 |
| 3.0.1 | stable | Not tested | 2021-05-26 16:13:44 |
| 3.0.0 | stable | Not tested | 2021-05-25 13:46:16 |
| 2.2.0 | stable | Not tested | 2021-05-25 13:09:08 |
| 2.1.1 | stable | Not tested | 2021-05-17 22:04:44 |
| 2.1.0 | stable | Not tested | 2021-03-24 14:16:49 |
| 2.0.0 | stable | Not tested | 2021-01-11 18:25:55 |
| 1.2.4 | stable | Not tested | 2020-12-01 13:31:52 |
| 1.2.3 | stable | Not tested | 2020-10-09 16:58:40 |
| 1.2.2 | stable | Not tested | 2020-07-14 13:56:48 |
| 1.2.1 | stable | Not tested | 2020-07-13 13:22:13 |
| 1.2.0 | stable | Not tested | 2020-06-10 14:30:03 |
| 1.1.10 | stable | Not tested | 2020-04-27 14:59:16 |
| 1.1.9 | stable | Not tested | 2020-04-06 19:10:43 |
| 1.1.8 | stable | Not tested | 2020-02-06 17:57:56 |
| 1.1.7 | stable | Not tested | 2020-01-29 16:22:17 |
| 1.1.6 | stable | Not tested | 2019-11-22 16:08:28 |
| 1.1.5 | stable | Not tested | 2019-11-05 15:35:39 |
| 1.1.4 | stable | Not tested | 2019-09-23 21:26:01 |
| 1.1.3 | stable | Not tested | 2019-08-21 16:06:46 |
| 1.1.2 | stable | Not tested | 2019-07-31 15:45:01 |
| 1.1.1 | stable | Not tested | 2019-07-30 15:00:08 |
| 1.1.0 | stable | Not tested | 2019-07-24 19:51:53 |
| 1.0.9 | stable | Not tested | 2019-07-24 18:58:33 |
| 1.0.8 | stable | Not tested | 2019-06-06 17:39:24 |
| 1.0.7 | stable | Not tested | 2019-05-01 15:37:06 |
| 1.0.6 | stable | Not tested | 2019-04-22 14:56:03 |
| 1.0.5 | stable | Not tested | 2018-05-08 19:52:14 |
| 1.0.4 | stable | Not tested | 2018-05-04 15:11:47 |
| 1.0.3 | stable | Not tested | 2017-12-13 21:35:43 |
| 1.0.2 | stable | Not tested | 2017-10-02 17:00:55 |
| 1.0.1 | stable | Not tested | 2017-03-22 21:08:48 |
| 1.0.0 | stable | Not tested | 2017-02-17 18:20:05 |
Requires 4
| Package | Constraint |
|---|---|
| php | ^8.1 |
| magento/module-quote | >=101.1.3 |
| ext-curl | * |
| giggsey/libphonenumber-for-php | ^9.0 |
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Pass | 0 | |
| PHPStan | Fail | 93 | 93 errors (level 4, ruleset: phpstan + bitexpert/phpstan-magento) |
| Cpd | Fail | 1 | 1 duplicated chunk spanning 14 total lines (min-lines=5, min-tokens=70) |
| Security | Pass | 0 |
No license declared
This package's composer.json doesn't declare a license, homepage, or authors. Check the source repository for terms of use.
Turn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.