Links

Amplitude

This page describes how to use Census with Amplitude.

🏃‍♀️ Getting Started

‌In this guide, we will show you how to connect Amplitude to Census and create your first sync.

Prerequisites

1. Get API key from Amplitude

Census needs only one piece of information to connect to your Amplitude project:
  • The API Key for an HTTP API data source for your Amplitude project

2. Create a HTTP API Data Source in Amplitude, and copy the API key

Amplitude lets you pull data from a number of different sources, including via HTTP API. If you don't have this data source set up in Amplitude already, you'll need to create one. The same steps below will also allow you to find the API key for a pre-existing HTTP API data source, as Amplitude will only permit one per project.
  1. 1.
    Within Amplitude’s left navigation bar, scroll down to the very bottom. Click on Sources & Destinations.\
  2. 2.
    ‌Once here, navigate to the top-right of the screen and click to Add Data Source. ****
    ​
  3. 3.
    Select “HTTP API” as the type of data source, and click Next.
    ​
  4. 4.
    Copy the API Key (it will be a long string of numbers and characters), click Next.
  5. 5.
    If you are setting up the HTTP API data source for the first time, Amplitude will require you to POST an event to their API to complete set-up. Amplitude provides instructions to send a sample event and complete set-up at this stage.
  6. 6.
    When the event is received by Amplitude, click Finish to finish setting up this source within Amplitude.

3. Create the Census Connection

Now that we have the API Key from Amplitude, we can now set up Amplitude as a Destination in Census.
  1. 1.
    In the Settings tab of Census, create a new Amplitude Service Connection. ****
    ​
  2. 2.
    You can provide whatever name you like.
  3. 3.
    Provide the copied API Key from Amplitude.
  4. 4.
    Save.

4. Create your first Model

Now navigate to the Model section of our Dashboard​
Here you will have to write SQL queries to select the data you want to see in Amplitude. Here are some ideas of data you should select
  • The Lifetime Value of a customer
  • The end date of a user's trial
  • The date a user became active in your product
  • The number of key activities a user did in your app in the last 7/30 days
Once you have created your model, click save.

5. Create your first Sync

Now head to the Sync page and click the Add Sync button
In the "What data do you want to sync?" section.
  • For the Connection, select the data warehouse you've already connected (See Prerequisites).
  • For the Source, select the model you created in step 4.
Next up is the "Where do you want to sync data to?" section.
  • Pick the Amplitude connection you created in step 3.
  • For Object, Select Device or User. If Devices can be associated with Users, then select Device. If no Device information is collected, select User.
For the "How should changes to the source be synced?" section.
  • Select Update Or Create
  • Pick the right mapping key; Amplitude only supports Distinct ID.
Finally, select the fields you want to update in the Mapper in the "Which Fields should be updated?" section. Here simply map the field from your Amplitude instance to the column from your model.
Click the Next button to see the final preview, which will have a recap of what will happen when you start the sync.

🗄️ Supported Objects

Object Name
Supported?
Identifiers
Devices
✅
Device ID
Users
✅
User ID
Groups
✅
Group Value
Events
✅
Insert ID
🎒 Contact us if you want Census to support more Objects for this destination
Both User and Device objects will resolve to a single User Profile in Amplitude. If Devices can be associated with Users, then select Device and map the User field to an appropriate value in your model. If no Device information is collected, select User.

Working with Amplitude's Data Model

Amplitude has very well optimized data model for analyzing time series event, but this model presents some quirks and challenges for historic data updating.
Each Event record in Amplitude has a snapshot of any user and group properties that applied to it at the moment that event was ingested into Amplitude. Amplitude's analyzes this event stream so this makes querying events really efficient.
But these events are immutable, meaning once they're written, they're never updated again, including that snapshot of user and group properties. This introduces some quirks:
  • If user properties are updated by Census, those user properties will only apply to any future ingested events at the time of their ingestion. So if User A's properties are updated by Census today, but they never again generate an event, the Amplitude UI will never show the updated user properties because none of the previous events' snapshots can be changed to reflect the updated properties.
  • This also means that historical event imports are limited. Historical events can be imported with updated user and group properties, but again, those properties will only be reflected on events ingested after the historical sync in real world time**,** not just in the future according to the timestamp of the events. This is because all events already ingested are immutable.
This is Amplitude's intended design: fast, but with some inflexibility. You can read more about it in Amplitude's documentation.

Working Around Missing User Properties

As a result of this behavior, we often get asked "Why can't I see my user properties?" and we explain that it's likely because the user hasn't had a subsequent event. Some users choose to work around this by creating a sort of Updated By Census synthetic Event instead of using the User Identify destination object. If you chose to go this route, you'll likely want to tell Amplitude to consider this an inactive event so that the user doesn't appear as active when this happens. See Amplitude's documentation on the steps to define that and make sure you do this before running the sync to avoid accidentally marking your users as active.

🔄 Supported Sync Behaviors

Learn more about what all of our sync behaviors on our Core Concept page.
Behaviors
Supported?
Objects
Update or Create
✅
Device, User, Group
Append
✅
Event
‌ 🔋 Contact us if you want Census to support more Sync Behaviors for this destination.
‌

🚑 Need help connecting to Amplitude?

​Contact us via [email protected] or start a conversation with us via the in-app chat.