Klaviyo integrates with both Magento 1 CE and Magento 1 EE. We currently support Magento versions 1.5 and higher.
There are two main steps to integrating Magento 1 with Klaviyo:
- Enabling the Magento Integration in Klaviyo.
- Installing the Klaviyo Extension in Magento.
This guide covers both steps and the related tasks for Magento 1 stores.
If you plan to integrate a Magento server that has multiple stores on it, please check out our guide on supporting multiple stores.
Setup a Magento API Key
The Magento 1 integration with Klaviyo requires a Magento API key. To create this key you'll need to set up a special role with full resource access and assign a new user to this role. The Username and Password of this user will serve as the API key.
- In your Magento admin panel click the System tab and select Web Services > SOAP/XML-RPC-Roles.
- Click Add New Role.
- Click the Role Resources tab and set Resource Access to All.
- Click the Role Info tab, name the role "Klaviyo", and click Save Role.
If you are not willing or able to provide full resource access or have other permissions concerns, see the section below on Creating a Magento API Key with Limited Permissions.
- Click the System tab and select Web Services > SOAP/XML-RPC-Users.
- Click Add New User.
- Click the User Role tab and set the Role to Klaviyo.
- Click the User Info tab. Set the User Name to "klaviyo" and enter a strong API Key. You can type in any alphanumeric value. Save the User Name and API Key as you will use them when enabling the Magento 1 integration in Klaviyo. Fill in the rest of the information and click Save User.
When enabling the Magento 1 integration in Klaviyo the User Name will serve as the API Username the API Key will serve as the Password / API Key.
To improve the performance of your integration we highly recommend enabling caching for the two Magento Web Services Configuration settings.
- In your Magento admin panel click on System > Cache Management.
- Enable caching on the two Web Services Configuration settings.
If you make any changes to your Magento setup that could affect the configuration of these APIs (e.g. change your domain name), be sure to flush the caches, which can be done on this page.
Enable the Magento 1 Integration in Klaviyo
Use the Magento API key you created to enable the Magento 1 integration in Klaviyo.
- Log into your Klaviyo account and click on the Integrations tab on the left-hand sidebar. Navigate to the All Integrations tab and find the Magento integration. Then click Add Integration.
- Enter the following information:
- Site URL: The site URL is the address of your Magento instance.
- API Username: The username you created for your new user with API permissions.
- Password / API key: The api key you created for your new user.
Install the Klaviyo Extension in Magento
Installing the Klaviyo Extension for Magento is required to start syncing Checkout Started events. It's important to sync your Checkout Started events so that they can trigger your Abandoned Cart flow.
Klaviyo's latest extension for Magento 1 (v.1.7.8, updated July 2019) is available for download here.
- Download the extension to your computer.
- Click System > Magento Connect > Magento Connect Manager.
- Under Direct package file upload click Choose File and select the extension you downloaded above. Click Upload. The extension will upload and install.
Once you've installed the extension, navigate to the extension's page and configure the settings.
- Click on System > Configuration and then click on Klaviyo under the Customers section. If after clicking Klaviyo you hit a 404 message, log out of Magento and log right back in.
- Set Enabled to Yes and fill in the other fields (the Consumer Key, Consumer Secret, Authorization Token, and Authorization Secret can all be left blank unless you are setting up coupons with Magento.)
You can access your Klaviyo public and private API keys from your Klaviyo account.
- Click Save Config.
Sync a Magento Signup Form to a Klaviyo List
You can optionally sync a Magento signup form so that users are added to a Klaviyo list.
- Create a list in Klaviyo that you want to sync with your Magento sign up form.
- Click on System > Configuration and then click on Klaviyo under the Customers section.
- From the General Subscription List dropdown select the Klaviyo list you want to sync to.
This process syncs all future subscribers. Existing subscribers need to be manually migrated from your Magento list into Klaviyo.
Set Up a Magento Cron Job
The Klaviyo extension uses cron jobs to stay up-to-date and run periodic maintenance tasks.
If you've installed and configured the Klaviyo Magento extension, but you're not seeing checkout data show up in Klaviyo, it might be because the required cron job isn't running.
From the Magento Admin Panel, go to System > Configuration.
Scroll all the way down to the Advanced section, and choose System.
Then select Cron (Scheduled Tasks). Set up a Cron to run every 5 minutes, then click Save Config.
Setting Up Cron In a UNIX Based Operating System
If you have shell access to your server, you can use the crontab service command. The Magento cron needs to run every five minutes, so the time configuration is:
*/5 * * * *
The full line in crontab will look like one of these (we suggest the first version):
*/5 * * * * /bin/sh MAGENTO_PATH/cron.sh */5 * * * * /bin/bash MAGENTO_PATH/cron.sh */5 * * * * /usr/bin/php MAGENTO_PATH/cron.php */5 * * * * /usr/local/bin/php -f MAGENTO_PATH/cron.php
MAGENTO_PATH is the location of your Magento installation on the server.
Setting Up Cron Using cPanel (or your virtual hosting provider)
If you don't have shell access you can consult your virtual hosting provider's documentation. We cover using cPannel as an example below.
Log into cPanel for your hosting account. Find the Advanced section and click the "Cron Jobs" icon.
A list of current cron jobs shows along with a form to add a new job. Enter the following settings in the "Add New Cron Job" form. Make sure to replace
MAGENTO_PATH with the path to your Magento installation. If you're not sure what the path is or how to find it, you can use an FTP program to browse the files on your server and find the directory that contains the
After you add the new cron job you should see checkout data in Klaviyo within 15 minutes.
Creating an API Key with Limited Permissions
This documentation covers the Magento SOAP API that Klaviyo's integration is built on. We recommend giving access to all endpoints within the path /api/*. While these will most likely not directly equate to the permissions you will see when setting up the SOAP user and role (as permissions have changed throughout various 1.x versions), here are the API calls we make for Magento 1.x:
If you need to whitelist certain ports (if you have a firewall, for example), the Magento integration is currently on HTTP/80, but if it is available on 443 this can be changed.
Data Synced with the Magento 1 Integration
The Magento 1 integration syncs with Klaviyo every 30 minutes.
Klaviyo's Magento integration allows you to pull certain customer information from your Magento platform to send targeted, data-driven emails in Klaviyo. Once you've configured your integration, you'll be able to personalize and target emails based on customer purchase and website activity. Here's some of the data we sync from Magento:
- Customer information including first name, last name, and location.
Klaviyo syncs all customers that subscribe to your Magento newsletter list moving forward. It is important to ensure that any customer that makes it to your Magento newsletter list has consented to receiving marketing emails.
- Fulfillment, refunded and canceled order data.
- When people visit your website and what items and categories they view.
- These metrics will show in your account as Active on Site and Viewed Product.
- You won't have to add the Klaviyo tracking snippet to your site with the Magento integration as these metrics are already handled by our extension.
When configuring your integration settings, you will have the option to pull in "Special Price," which refers to a special sale price for items that can optionally take effect in a certain date range. For each product, there are 4 metadata fields that we will sync:
price(Required float): The standard price of the item
special_price(Optional float): This is a special sale price for the item. When this price is in effect, you will see this
special_pricenext to a strikethrough of the
special_from_date(Optional date): This specifies a start date for
special_priceto take effect
special_to(Optional date): This specifies an end date for
special_pricebeing in effect
On the Magento 1 integration page, there is a checkbox under Advanced Options to "Use special price for product prices when applicable." When this setting is enabled, the product block will display the special price when applicable. When using a dynamic product feed, the special price will populate at send time. When manually selecting items from your catalog, the special price will populate once you select the product(s).
Convert Magento Order Values into a Single Currency
Klaviyo supports the conversion of all foreign currencies in Magento into one primary currency in Klaviyo. When this feature is enabled, the conversion happens when Magento syncs order data into Klaviyo. This is especially helpful if you have multiple stores with transactions in different currencies.
Klaviyo will check if the order_currency_code is the same as the set global_currency_code. If not, Klaviyo will convert the order total from the order currency to the global currency specified in your integration settings. This ensures that your financial analytics are accurate.
Contact customer support if you are interested in enabling this feature in your Klaviyo account.