Amplitude

Overview

Amplitude is a product analytics service that tracks user events and builds rich cross-sectional and longitudinal profiles. It primarily sources users and events from websites and mobile apps. Amplitude provides a powerful UI enabling you to create "cohorts" of users based on event histories.

Integrating Lytics with Amplitude provides cross-channel profile resolution, expedited marketing activation, and Journey Orchestration. Lytics can import the cohorts and events stored in Amplitude, enabling users to further refine targeting logic.

Authorization

If you haven't already done so, you will need to setup an Amplitude account before you begin the process described below. Follow the instructions on setting up an account and starting a new project. Each project has its own unique API key and secret, which you will need to authorize this integration.

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

  1. Select Amplitude from the list of providers.
  2. Select the Amplitude 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 API Key field, enter your Amplitude API username.
  6. In the API Secret field, enter your Amplitude API password.
  7. Click Save Authorization.
    Amplitude Auth

Import Cohorts

Importing cohorts from Amplitude results in new and/or updates to existing user profiles in your Lytics account containing fields from Amplitude. Once imported, Lytics can use this Amplitude data to inform its ML-based enrichments, and this data enables you to target your multi-channel campaigns orchestrated by Lytics.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration.
  • Frequency: Batch Integration one-time or daily continuous updates where the time of day can be configured.
  • Resulting Data: Full user profiles from Amplitude for selected Cohorts.

This integration utilizes the Amplitude Behavioral Cohorts API to retrieve data. On each run of the job, it will request a list of cohorts, and for each cohort selected by the user during the configuration step, it will:

  1. Request a single cohort for download.
  2. Poll the request status for completion.
  3. Once completed, download the cohort file.
  4. Ingest the data from the cohort file into the Lytics data stream amplitude_cohorts.

Fields

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

Source FieldLytics User FieldDescriptionType
amplitude_idamplitude_id unique idAmplitude IDstring
carrieramplitude_carrierAmplitude Carrierstring
citycityCitystring
countrycountryCountrystring
deviceamplitude_deviceAmplitude Devicestring
device_typeamplitude_device_typeAmplitude Device Typestring
dmaamplitude_dmaAmplitude DMAstring
languagelanguageLanguagestring
libraryamplitude_libraryAmplitude Librarystring
map(cohort_id, cohort_membership)amplitude_cohort_idsAmplitude Cohort IDsmap[string]bool
map(cohort_name, cohort_membership)amplitude_cohort_namesAmplitude Cohort Namesmap[string]bool
osamplitude_osAmplitude OSstring
platformamplitude_platformAmplitude Platformstring
regionregionState/Provincestring
regionstateStatestring
start_versionamplitude_start_versionAmplitude Start Versionstring
todate(last_computed)amplitude_last_computedAmplitude Cohort Last Computed timedate
user_idamplitude_user_id unique idAmplitude User IDstring
versionamplitude_versionAmplitude Versionstring

Configuration

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

  1. Select Amplitude from the list of providers.

  2. Select the Import Cohorts 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.
    Amplitude Cohort Import Config

  7. (Optional) From the Amplitude ID Field input, select the field name that contains the user's Amplitude ID. If left blank, cohorts will only be added to profiles.

  8. (Optional) From the Amplitude Cohort Names Field input, select the field name that contains the user's cohort membership. If left blank, cohorts will only be added to profiles.

  9. (Optional) From the Cohorts input, select select the cohorts you want to import. If left blank, all cohorts will be imported.

  10. (Optional) Select the Keep Updated checkbox, to import cohorts daily.

  11. (Optional) From the Time of Day input, select time of day to start import.

  12. (Optional) From the Timezone input, select timezone for time of day.

  13. Click Start Import.

Import Events

Importing events from Amplitude enables you to refine audience definitions within Lytics. Beyond just basic event triggers, Lytics can apply its ML-powered Behavioral Scores and Content Affinities to enhance user profiles.

Integration Details

  • Implementation Type: Server-side Integration.
  • Implementation Technique: REST API Integration.
  • Frequency: Batch Integration one-time or daily continuous updates.
  • Resulting Data: User Fields and Raw Event Data (see additional fields).

This integration utilizes the Amplitude Export API to retrieve event data. On each run of the job, it will:

  1. Request an export of zipped event data in a JSON format.

    NOTE: If the user opted to backfill events, on the first run of the job it will request all events from the time frame selected by the user. Otherwise the import requests a file of all events between the current and previous run.
  2. Ingest the data from the JSON files into the Lytics data stream amplitude_events.

Fields

The following fields are included in the default mapping from the amplitude_events stream:

Source FieldLytics User FieldDescriptionType
$insert\_idamplitude_insert_idAmplitude Insert Idstring
$schemaamplitude_schemaAmplitude Schemaint
adidamplitude_adidAmplitude Adidstring
amplitude_attribution_idsamplitude_attribution_idsAmplitude Amplitude Attribution IDsstring
amplitude_event_typeamplitude_event_typeAmplitude Amplitude Event Typestring
amplitude_idamplitude_id unique idAmplitude IDstring
appamplitude_appAmplitude Appint
citycityCitystring
countrycountryCountrystring
dataamplitude_dataAmplitude Datastring
device_brandamplitude_device_brandAmplitude Device Brandstring
device_carrieramplitude_device_carrierAmplitude Device Carrierstring
device_familyamplitude_device_familyAmplitude Device Familystring
device_idamplitude_device_idAmplitude Device IDstring
device_manufactureramplitude_device_manufacturerAmplitude Device Manufacturerstring
device_modelamplitude_device_modelAmplitude Device Modelstring
device_typeamplitude_device_typeAmplitude Device Typestring
dmaamplitude_dmaAmplitude Dmastring
event_idamplitude_event_idAmplitude Event IDint
idfaamplitude_idfaAmplitude Idfastring
is_attribution_eventamplitude_is_attribution_eventAmplitude Is Attribution Eventbool
languagelanguageLanguagestring
libraryamplitude_libraryAmplitude Librarystring
location_latamplitude_location_latAmplitude Location latnumber
location_lngamplitude_location_lngAmplitude Location lngnumber
match("event_properties.")amplitude_event_propertiesAmplitude Event Propertiesmap[string]string
match("group_properties.")amplitude_group_propertiesAmplitude Group Propertiesmap[string]string
match("user_properties.")amplitude_user_propertiesAmplitude User Propertiesmap[string]string
os_nameamplitude_os_nameAmplitude OS Namestring
os_versionamplitude_os_versionAmplitude Os Versionstring
payingamplitude_payingAmplitude Payingbool
platformamplitude_platformAmplitude Platformstring
regionregionState/Provincestring
regionstateStatestring
sample_rateamplitude_sample_rateAmplitude Sample Ratestring
session_idamplitude_session_idAmplitude Session IDstring
todate("2006-01-02 15:04:05.000000", client_event_time)amplitude_client_event_timeAmplitude Client Event Timedate
todate("2006-01-02 15:04:05.000000", client_upload_time)amplitude_client_upload_timeAmplitude Client Upload Timedate
todate("2006-01-02 15:04:05.000000", event_time)amplitude_event_timeAmplitude Event Timedate
todate("2006-01-02 15:04:05.000000", server_upload_time)amplitude_server_upload_timeAmplitude Server Upload Timedate
todate("2006-01-02 15:04:05.000000", user_creation_time)amplitude_user_creation_timeAmplitude User Creation Timedate
user_idamplitude_user_id unique idAmplitude User IDstring
valuect(event_type)amplitude_eventsAmplitude Event Countmap[string]intsum

Additional fields

The following fields are not included in the default mapping, reach out to the customer support team to add them to the mappings for your account.

Source FieldLytics User FieldDescriptionType
server_received_timeamplitude_server_received_timeAmplitude Server Received Timedate
processed_timeamplitude_processed_timeAmplitude Processed Timedate
version_nameamplitude_version_nameAmplitude Version Namestring
start_versionamplitude_start_versionAmplitude Start Versionstring
uuidamplitude_uuidAmplitude UUIDstring
ip_addressamplitude_ip_addressAmplitude IP Addressstring

Configuration

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

  1. Select Amplitude from the list of providers.
  2. Select the Import 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.
    image
  7. In the Backfill Days numeric field, enter how many days in the past do you want to import events (default is 90 days). Select 0 if you want to start from now on.
  8. (Optional) Toggle Show Advanced Options. Select the Keep Updated checkbox to import events hourly.
  9. Click Start Import.