Overview

Drift is a conversational marketing platform with customer conversations at its core. Drift gives you the website engagement metrics, insights, and analytics to continually optimize and improve across both marketing and sales. Integrating Lytics with Drift enables you to import Drift's conversation, message, and customer data to add to your Lytics user profiles.

Authorization

If you haven't already done so, you will need to set up a Drift account before you begin the process described below.

Setup Drift App and Webhooks

Note this will only need to be done once per account.

  1. Go to Drift's developer site and click on Build your app or Create new app after logging in.
    drift_integration_create app
  2. Click on OAuth & Scopes
    drift_integration_scopes
  3. Under the scopes heading, from the add permissions by scopes Dropdown, select the following permissions:
    • contact_read
    • conversation_read
  4. Under the Display Information tab, set the app name to "Lytics Integration".
  5. Under the Install to Drift tab click the Install App to Drift button to generate an OAuth Access Token. This will be used to authenticate with Drift.
  6. Copy the Oauth Access token that replaces the Install App to Drift button.
    drift_integration_oauth

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

  1. Select Drift from the list of providers.
  2. Select the Drift App 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 App Key text box, enter your OAuth Access Token.
    authorization
  6. Click Save Authorization.

Import Activity Data

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

Integration Details

  • Implementation Type: Client-side Integrations.
  • Implementation Technique: REST API Integration and/or Webhook Integration.
  • Frequency: Batch Integration and/or Real-time Integration.
  • Resulting data: User Profiles and Content.

This integration uses Drift's Conversation API to import conversations. Once the job is started, it will:

  1. Retrieve conversations from Drift
  2. Retrieve contacts assocatied with each conversation.
  3. Retrieve messages associated with each conversation.

Fields

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

Source FieldLytics User FieldDescriptionType
citycityCitystring
contact_iddr_contact_id unique idDrift Contact IDstring
countrycountryCountrystring
email(email)email unique idEmail Addressstring
emaildomain(email)email_domainEmail Domainstring
employeremployerEmployerstring
epochms(start_date)dr_start_dateDrift Start Datenumber
first_namefirst_nameFirst Namestring
full_namenameFull Namestring
last_namelast_nameLast Namestring
phonephonePhone Numberstring
set(split(tags, ","))dr_tagsContact Tags[]string
statestateStatestring
titlejob_titleJob Titlestring

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

Source FieldLytics User FieldDescriptionType
contact_iddr_contact_id unique idDrift Contact IDstring
conversation_iddr_conversation_id unique idDrift Conversation IDstring
count(msg_author_type)dr_contact_msg_ctDrift Contact Message Countint
count(msg_id)dr_msg_ctTotal Drift Message Countint
georegion(msg_ip)regionState/Provincestring
max(epochms())dr_last_msg_tsTime of Last Drift Messagedate
min(epochms())dr_first_msb_tsTime of First Drift Messagedate
msg_citycityCitystring
msg_countrycountryCountrystring
msg_postal_codezipZipstring
valuect(hourofday())dr_hourlyDrift Active Hour of daymap[string]intsum
valuect(hourofweek())dr_hourofweekDrift Active Hour of Weekmap[string]intsum
valuect(yymm())dr_yymmDrift Active Monthsmap[string]intsum

Configuration

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

  1. Select Drift from the list of providers.
  2. Select the import 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. (optional) Select the Keep Updated checkbox to import continuously.
  7. (optional) In the Start Date text box, enter a date to begin importing data from. Please use the format yyyy-mm-dd, e.g. 2021-11-19.
  8. (optional) Select the Skip Messages checkbox to skipping importing message details.
  9. (optional) Select the Skip Contact Details checkbox to skip importing contact details.

Drift Import Config

  1. Click the Start job button to start the job

Configure Webhooks

Lytics highly recommends setting up Drift event webhooks for real time event capture of your events. This will allow Lytics to get real-time activity data on your Drift integrated conversations.

Note: If you are running a continous import from Drift and using webhooks, some user activity data may be captured twice.

  1. Go to Drift's developer site and click on Build your app or Create new app after logging in.
    drift_integration_create app
  2. Click on OAuth & Scopes
    drift_integration_scopes
  3. Under the scopes heading, from the add permissions by scopes Dropdown, select the following permissions:
    • contact_read
    • conversation_read
  4. Under the Events tab:
    drift_integration_events
    • Fill in the request URL with https://api.lytics.io/api/collect/json/drift?access_token=YOUR_API_TOKEN where YOUR_API_TOKEN is your Lytics API token. You can create a new Lytics API token from your Lytics account settings.
    • Under the Subscribe to events heading add contact_identified, new_message, and new_conversation.
  5. Under the Display Information tab, set the app name to "Lytics Webhooks".
    drift_integration_name
  6. Under the Install to Drift tab click the Install App to Drift button. Lytics will start receiving the selected events from drift
    drift_integration_install