Amplitude integration: stream Userflow events and sync cohorts

Prev Next

The Amplitude integration connects one Userflow environment to one Amplitude project. It streams Userflow-generated events into Amplitude, and it syncs Amplitude cohorts into Userflow as segments you can target content with.

What does the Amplitude integration do?

The Amplitude integration does two separate things. You can set up either one or both.

  • Event streaming: Userflow-generated events, such as Flow Started and Checklist Task Completed, are sent to the Amplitude project you choose.

  • Cohort sync: cohorts you define in Amplitude appear as segments in Userflow. Userflow calls these lists of users “segments” and Amplitude calls them “cohorts”, but they’re the same thing.

Do I need a separate Amplitude integration for Staging and Production?

Yes. Each Amplitude integration connects one Userflow environment to one Amplitude project. Use a separate Amplitude project for each of your Userflow environments, such as Production and Staging, so Staging data doesn’t mix with Production data.

If you have both, set up the integration once for each. We strongly recommend connecting Staging first and checking that it works before you connect Production.

Use the same user ID in Amplitude and Userflow

The Amplitude integration matches users by user ID. Identify each user with the same ID in Amplitude and in Userflow, or streamed events and synced cohorts won’t line up.

Stream Userflow events to Amplitude

  1. Sign in to Amplitude and go to Settings.

    Settings in the Amplitude sidebar

  2. Go to Projects.

    Projects page in Amplitude settings

  3. Select the project you want to send Userflow events to.

    Selecting an Amplitude project

  4. Copy the API Key.

    API Key for an Amplitude project

  5. Sign in to Userflow and switch to the environment you want to send events from.

    Environment picker in Userflow

  6. Go to Settings → Integrations and click Add integration.

    Add integration button in Userflow Settings → Integrations

  7. Find and click Amplitude in the list.

    Amplitude in the Userflow integrations list

  8. Click Add Amplitude.

    Add Amplitude button

    If you don’t see Add Amplitude, the integration may not be included in your plan. Check your billing settings.

  9. Paste the API key you copied from Amplitude into the Amplitude API Key field and click Save.

    Amplitude API Key field in Userflow

  10. Click the Stream events from Userflow to Amplitude switch and confirm in the dialog.

    Stream events from Userflow to Amplitude switch

  11. Streaming starts immediately.

    Event streaming turned on for Amplitude

  12. In Amplitude, go to User Look-Up in the main menu.

    User Look-Up in the Amplitude menu

  13. Check that the right project is selected at the top, then check that Userflow events are coming in. It can take a minute for them to appear.

    Userflow events in Amplitude User Look-Up

How do I stop streaming events to Amplitude?

  1. In Userflow, go to Settings → Integrations and open Amplitude.

  2. Check the Stream events from Userflow to Amplitude switch. Gray means streaming is already off. Green means it’s on.

  3. Click the switch and confirm in the dialog.

Event streaming to Amplitude stops immediately.

Sync Amplitude cohorts to Userflow

Cohort sync keeps an Amplitude cohort up to date as a segment in Userflow. Add the Amplitude integration in Userflow before you start (steps 5 to 9 of Stream Userflow events to Amplitude; you don’t need to turn on streaming).

  1. In Userflow, go to Settings → Integrations → Amplitude and click Reveal Integration Secret.

  2. Copy the Integration Secret.

  3. In Amplitude, go to Cohorts.

  4. Pick the cohort you want to sync.

  5. Click Sync to… → Destinations Page → View All Destinations.

  6. Find and click Userflow.

  7. Click Add another destination.

  8. Give it a name, such as your Userflow account name and environment.

  9. Paste the Integration Secret you copied from Userflow.

  10. Important: under User ID Mapping, choose User ID on the Amplitude side. Amplitude and Userflow must use the same user ID.

  11. Click Save.

  12. Go back to the cohort you want to sync. You may need to reload the page.

  13. Click Sync to… → Userflow.

  14. Choose a one-time sync or a recurring sync.

  15. Click Save sync.

Amplitude starts syncing right away. The cohort appears as a segment on the Users page in Userflow.