Drift
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.
- Go to Drift's developer site and click on Build your app or Create new app after logging in.
- Click on OAuth & Scopes
- Under the scopes heading, from the add permissions by scopes Dropdown, select the following permissions:
- contact_read
- conversation_read
- Under the Display Information tab, set the app name to "Lytics Integration".
- 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.
- Copy the Oauth Access token that replaces the Install App to Drift button.
If you are new to creating authorizations in Lytics, see the Authorizations documentation for more information.
- Select Drift from the list of providers.
- Select the Drift App Key method for authorization.
- In the Label text box, enter a name for the authorization
- (optional) In the Description text box, enter a description for this authorization
- In the App Key text box, enter your OAuth Access Token.
- 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:
- Retrieve conversations from Drift
- Retrieve contacts assocatied with each conversation.
- Retrieve messages associated with each conversation.
Fields
The following fields are included in the default mapping of the drift_contacts
stream:
Source Field | Lytics User Field | Description | Type |
---|---|---|---|
city | city | City | string |
contact_id | dr_contact_id unique id | Drift Contact ID | string |
country | country | Country | string |
email(email) | email unique id | Email Address | string |
emaildomain(email) | email_domain | Email Domain | string |
employer | employer | Employer | string |
epochms(start_date) | dr_start_date | Drift Start Date | number |
first_name | first_name | First Name | string |
full_name | name | Full Name | string |
last_name | last_name | Last Name | string |
phone | phone | Phone Number | string |
set(split(tags, ",")) | dr_tags | Contact Tags | []string |
state | state | State | string |
title | job_title | Job Title | string |
The following fields are included in the default mapping of the drift_conversations
stream:
Source Field | Lytics User Field | Description | Type |
---|---|---|---|
contact_id | dr_contact_id unique id | Drift Contact ID | string |
conversation_id | dr_conversation_id unique id | Drift Conversation ID | string |
count(msg_author_type) | dr_contact_msg_ct | Drift Contact Message Count | int |
count(msg_id) | dr_msg_ct | Total Drift Message Count | int |
georegion(msg_ip) | region | State/Province | string |
max(epochms()) | dr_last_msg_ts | Time of Last Drift Message | date |
min(epochms()) | dr_first_msb_ts | Time of First Drift Message | date |
msg_city | city | City | string |
msg_country | country | Country | string |
msg_postal_code | zip | Zip | string |
valuect(hourofday()) | dr_hourly | Drift Active Hour of day | map[string]intsum |
valuect(hourofweek()) | dr_hourofweek | Drift Active Hour of Week | map[string]intsum |
valuect(yymm()) | dr_yymm | Drift Active Months | map[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.
- Select Drift from the list of providers.
- Select the import job type from the list.
- Select the Authorization you would like to use or create a new one.
- Enter a Label to identify this job you are creating in Lytics.
- (Optional) Enter a Description for further context on your job.
- (optional) Select the Keep Updated checkbox to import continuously.
- (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.
- (optional) Select the Skip Messages checkbox to skipping importing message details.
- (optional) Select the Skip Contact Details checkbox to skip importing contact details.
- 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.
- Go to Drift's developer site and click on Build your app or Create new app after logging in.
- Click on OAuth & Scopes
- Under the scopes heading, from the add permissions by scopes Dropdown, select the following permissions:
- contact_read
- conversation_read
- Under the Events tab:
- Fill in the request URL with
https://api.lytics.io/api/collect/json/drift?access_token=YOUR_API_TOKEN
whereYOUR_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
, andnew_conversation
.
- Fill in the request URL with
- Under the Display Information tab, set the app name to "Lytics Webhooks".
- Under the Install to Drift tab click the Install App to Drift button. Lytics will start receiving the selected events from drift
Updated 10 months ago