Klaviyo integrates with both Magento 1 CE and Magento 1 EE. 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.
We currently support Magento versions 1.5 and higher.
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 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. 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.
NoteWhen 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.
NoteIf 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.
- In your Klaviyo account click the Integrations tab and click on the Magento 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.6, updated April 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.
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. Consult the Magento documentation for more detailed information.
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 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.
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 dopdown select the Klaviyo list you want to sync to.
NoteThis process syncs all future subscribers. Existing subscribers need to be manually migrated from your Magento list into Klaviyo.
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
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).