Overview

Klaviyo is an email marketing platform created for online businesses β€” featuring powerful email and SMS marketing automation.

Integrating Lytics with Klaviyo allows you to import user profiles and email campaign activity data (such as opens and clicks). You can also export users based on audience membership in real-time for use in email campaigns.

Authorization

If you haven't already done so, you will need to set up a Klaviyo account and generate a Klaviyo private API key for your account before you begin the process described below.

If you are new to creating authorizations in Lytics, see the Authorizations documentation for more information.

  1. Select Klaviyo from the list of providers.
  2. Select the Klaviyo API Key method for authorization.
  3. In the Label text box, enter a name for the authorization
  4. (optional) In the Description text box, enter a description for this authorization
  5. In the Private API Key password box, enter your Private API Key credential.
  6. Click Save Authorization.

Klaviyo Authorization

Export Audiences

Exporting Lytics audiences to Klaviyo allows you to enhance your Klaviyo user base with new users or update existing users with cross-channel data from Lytics.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration - Audience Trigger Integration
  • Frequency: Real-time Integration with an optional one-time Backfill of the audience after job setup.
  • Resulting data: Lytics users that are members of the selected audiences are exported to Klaviyo and added to the selected list. Lytics users can be exported to an existing list or a new list. Only known users (with an email) are exported.

This integration utilizes the Klaviyo API to send users to a list in Klaviyo. Once the export is started, the job will:

  1. Check if an existing list was selected. If not, create a new list with the name provided in the configuration. If no name is provided, create a new list with the name format Lytics {Date}.
  2. Run a backfill by creating or updating existing users in Klaviyo. Users will be subscribed to a list by default. Otherwise, users are force added to a list.
  3. After a backfill, the job will receive real-time updates when a user enters or exits the audience.
  4. For each user entering the selected audience(s), the job will create or update the user in Klaviyo and by default subcribe the user or force add the user to the Klaviyo list. Only known users with valid email identifiers are included in the export.
  5. For each user exiting the selected audience(s), the job will remove the user from the selected list.

Larger audiences may take a few days to be completely added to a list due to Klaviyo API limitations.

Fields

By default, Lytics exports the following fields to Klaviyo:

Lytics User FieldDescriptionKlaviyo FieldType
emailEmail AddressEmailstring

In addition to the default fields, you can export a number of Lytics user fields to Klaviyo fields. Lytics allows you to map user profile fields with the corresponding Klaviyo field as part of the job configuration.

Configuration

Follow these steps to set up and configure an export job for Klaviyo in the Lytics platform. If you are new to creating jobs in Lytics, see the Destinations documentation for more information.

  1. Select Klaviyo from the list of providers.
  2. Select the Export Audiences job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Select the audiences to export.
  7. Complete the configuration steps for your job.
  8. (Optional) From the List input, select an existing list to export to. If no list is selected, a new list will be created.
  9. (Optional) In the New List Name text box, enter a new list name to export to. If no list name is entered, a new list will be created with the name format Lytics {Date}. NOTE: A selected list name will take priority over creating a list with a new name.
  10. From the Email Field input, select the field that contains the user emails.
  11. (Optional) From the Map Fields input, map all the fields from Lytics to Klaviyo by selecting the Lytics field on the left, and its Klaviyo destination on the right.
  12. (Optional) Select the Force Add to List checkbox to force add profiles to a list. This will ignore a list's opt-in settings. Otherwise, profiles will be single or double opted into the list in accordance with that list’s settings.
  13. Click Start Export.

Klaviyo Export

Users will be available in the Klaviyo list within a few minutes of starting the export. Larger audiences may take a few days to be completely added to the list. You can find the new list in Klaviyo under Lists & Segments.

Import Users & Activity

Importing user and activity data from Klaviyo results in new users or existing user profiles supplemented with Klaviyo data. You can use this data to build and refine your existing Lytics audiences to power better, cross-channel campaigns.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration.
  • Frequency: Batch Integration every hour.
  • Resulting data: User Profiles and Raw Event Data.

This integration utilizes Klaviyo APIs to import user and campaign data. Once the import is started, the job will:

  1. Iterate through all the selected lists and for each:
    1. Get the lists's members.
    2. Iterate through all the members in a list and get the profile. If the member's profile has been updated since the last import, the member's profile is passed to klaviyo_users stream.
  2. For all the selected lists, get the activity metric data since the last import. Activity metrics are passed to klaviyo_activity stream.

Fields

The following fields are included in the default mapping of the klaviyo_users stream. If you want to import custom user fields from Klaviyo, please contact your Lytics account manager.

Source FieldLytics User FieldDescriptionType
$address1address_1Address Line 1string
$address2address_2Address Line 2string
$citycityCitystring
$countrycountrystring
$first_namefirst_nameFirst Namestring
$last_namelast_nameLast Namestring
$latitudelatitudeLatitudestring
$longitudelongitudeLongitudestring
$organizationorganizationOrganizationstring
$phone_numberphonePhone Numberstring
$regionregionRegionstring
$timezonetimezoneTimezonestring
$titletitleTitlestring
$zipzipZipstring
email($email)email unique idEmailstring
idka_profile_id unique idKlaviyo Profile Idstring
set(campaign_ids)ka_campaign_idsKlaviyo Campaigns[]string
set(list_ids)ka_list_idsKlaviyo Lists[]string
todate(updated)ka_user_updatedKlaviyo Profile Updateddate

The following fields are included in the default mapping of the klaviyo_activity stream:

Source FieldLytics User FieldDescriptionType
Client Namemail_clientMail Clientstring
Client OS Familymail_client_os_familyMail Client Operating System Familystring
Client OSmail_client_osMail Client Operating Systemstring
Client Typemail_client_typeMail Client Typestring
Email DomainemaildomainEmail Domainstring
count(event_name)ka_clickctKlaviyo Click Countint
count(event_name)ka_openctKlaviyo Opened Email Countint
count(event_name)ka_recievedctKlaviyo Recieved Email Countint
count(event_name)ka_unsubctKlaviyo Unsubscribe Countint
email(email)emailstring
epochms()ka_recieved_tsKlaviyo Recieved Email Timedate
epochms()ka_unsub_tsKlaviyo Unsubscribe Timedate
event_nameka_email_eventKlaviyo Email Eventstring
max(epochms())ka_lastclick_tsKlaviyo Last Email Clickdate
max(epochms())ka_lastopen_tsKlaviyo Last Opened Emaildate
max(epochms())last_active_tsLast Active on Any Channeldate
min(epochms())ka_firstclick_tsKlaviyo First Email Clickdate
min(epochms())ka_firstopen_tsKlaviyo First Opened Emaildate
profile_idka_profile_id unique idKlaviyo Profile Idstring
set(Subject)ka_email_subjectKlaviyo Email Subject[]string
set(URL)ka_email_urlKlaviyo Campaign URL[]string
set(Campaign Name)ka_campaign_nameKlaviyo Campaign Name[]string
set(campaign_id)ka_campaign_idsKlaviyo Campaign Ids[]string
valuect(event_name)ka_email_eventctKlaviyo Email Event Countmap[string]intsum
valuect(hash(urlmain(URL)))hashedurlsHashed URLs Visitedmap[string]intsum
valuect(hourofday())ka_hourlyclickKlaviyo Email Clicks By Hourmap[string]intsum
valuect(hourofday())ka_hourlyopenKlaviyo Opened Emails By Hourmap[string]intsum

Configuration

Follow these steps to set up and configure an import job for Klaviyo in the Lytics platform. If you are new to creating jobs in Lytics, see the Data Sources documentation for more information.

  1. Select Klaviyo from the list of providers.
  2. Select the Import Users and Activity Data job type from the list.
  3. Select the Authorization you would like to use or create a new one.
  4. Enter a Label to identify this job you are creating in Lytics.
  5. (Optional) Enter a Description for further context on your job.
  6. Complete the configuration steps for your job.
    Klaviyo import work config
  7. From the Lists to Import input, select lists to import. Lists available to be imported from Klaviyo are located in the left column. Campaigns added to the right column will be imported to Lytics.
  8. (Optional) Select the Skip importing Klaviyo activity data checkbox to skip importing Klaviyo activity.
  9. (Optional) Select the Skip importing Klaviyo user profiles checkbox to skip importing Klaviyo users.
  10. (Optional) In the Start Date text box, enter the date to start importing Klaviyo user and activity data. Please use the format yyyy-mm-dd, e.g. 2021-01-25.
  11. (Optional) Select the Keep Updated checkbox to continuously import data.
  12. Click Start Import.