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 Credentials
The Magento 1.x integration with Klaviyo requires a creating a new 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 credentials.
It is a good practice to make sure the PHP memory limit on your server and Magento instance is at least 1-2 GB before beginning the SOAP integration with Magento 1.x. We begin the integration by syncing your historical data so it will be important to verify this setting in Magento and your server before activating the integration. The default setting for the Magento PHP memory limit tends to be less than 756 MB so if you have not historically edited this setting, it would be a good idea to check!
In your Magento admin panel click the System tab and select Web Services > SOAP/XML-RPC-Roles.
Select Add New Role. Then click the Role Resources tab and set Resource Access to All.
Select the Role Info tab, name the role "Klaviyo," and click Save Role.
The "Klaviyo" role as described above has full resource access. If you have concerns about permissions and would prefer to create a role with limited resource access, 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.
Select 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.
Expand Advanced Options.
Enable these settings as needed:
- Stores: all Magento 1 stores are synced to Klaviyo by default. This setting allows you to be selective about which stores you integrate with. Head over to Supporting Multiple Magento Stores to learn more.
- Special Price Settings: we highly recommend enabling Special Price Settings if you're planning to use this feature. It is more difficult to enable this feature later. You can read more about this setting in the Special Price section below.
- Coupon Settings: review this guide on how to enable coupons in Magento 1 and then fill in these fields.
When finished, click Connect to Magento.
Magento 1 is now connected to Klaviyo. Next you'll add the Klaviyo Extension/Plugin to your Magento account.
Install the Klaviyo Extension in Magento
The Klaviyo Extension/Plugin adds web tracking and viewed product tracking to your Magento store. 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.9, updated February 2020) is available for download here.
After downloading the extension to your computer, navigate to 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 to 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.
When finished, 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.
First, create a list in Klaviyo that you want to sync with your Magento sign up form.
If you're not already on the General Settings tab (as instructed in the previous section,) navigate to System > Configuration , and click on Klaviyo under the Customers section.
From the General Subscription List dropdown select the Klaviyo list you want to sync to.
By default, Use Klaviyo Opt-In Settings For This List is set to Yes, use the Klaviyo settings for this list. We recommend that you keep this setting enabled. When this setting is enabled:
- For a double opt-in list: the user will get a confirmation email before they're added to the designated list. Once they confirm via email, they are added to the list and a Subscribe to List metric is created. If no confirmation is received, they will not be added to the list.
- For a single opt-in list: the customer will be added to a list and a Subscribe to List metric is created.
If No, do not send opt-in emails from Klaviyo is enabled, a Subscribed to List metric will never be created when a profile is added to a list. We don't recommend this setting, but it is available to preserve a legacy setting.
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.
Monitoring the Historical Data Sync
When you first integrate with Magento 1, Klaviyo will sync the last 90 days of your Magento 1 data so you can get started right away with engaging your most recent customers. After the sync of your most recent 90 days of data, Klaviyo will begin your complete historical data sync. Depending on how many orders, customers and products your store has, it can take anywhere from a few minutes to several days to sync all of your data.
Find the Placed Order metric and change the date range of the graph to see which dates have been fully synced. When the sync is complete, the Magento 1 integration in the Integrations tab will be marked complete. If you want to verify for yourself that all data from Magento 1 is synced, you can cross-check the total orders for a few days or a week. Before you start validating, make sure your account's timezone matches the settings in Magento 1.
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.
To learn more, head over to Review and Understand your Magento 1 Data.
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.
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_date(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.