Amplitude
Send Snowplow events to Amplitude to power product and marketing analytics or guide and survey personalization using Amplitude's HTTP API v2.
Prerequisites
Before setting up the forwarder in Console, you'll need an Amplitude API Key. To find your API key:
- Log in to your Amplitude workspace
- Click Settings in the top right, then click Organization Settings
- From the sidebar, select Projects, then select your Project to view its details
- Copy the API Key
To avoid introducing bad data in your production Amplitude project, we recommend using a test or development Amplitude project to test your transformations first. Then, create a new Connection in Console with your production API key, and a new forwarder that imports the configuration from your development forwarder.
Getting started
Configure the destination
To create the connection and forwarder, follow the steps in Creating forwarders.
When configuring the connection, select Amplitude for the connection type, enter your API key, and select the Server Location where your Amplitude project is hosted.
Validate the integration
You can confirm events are reaching Amplitude by checking the Ingestion Debugger page in your Amplitude account:
- From the left navigation bar, click Data, then select Sources from the sidebar. You will see a list of sources.
- Select the Ingestion Debugger tab
- Filter the graphs to show only events from the HTTP API to confirm data is flowing as expected from Snowplow.
Schema reference
This section contains information on the fields you can send to Amplitude, including field names, data types, required fields, and default Snowplow mapping expressions.
Field | Details |
---|---|
event_type string | Required. A unique identifier for your event. Default mapping:event?.event_name |
user_id unknown | Optional. ID for the user. Required if event?.user_id |
device_id unknown | Optional. A device-specific identifier, such as the Identifier for Vendor on iOS. Required if event?.domain_userid ?? event?.contexts_com_snowplowanalytics_snowplow_client_session_1?.[0]?.userId |
event_id integer | Optional. An incrementing counter to distinguish events with the same user_id and timestamp from each other. |
session_id integer | Optional. The start time of the session in milliseconds since epoch (Unix timestamp). Necessary if you want to associate events with a particular system. Default mapping:spTstampToEpochMillis(event?.contexts_com_snowplowanalytics_snowplow_client_session_1?.[0]?.firstEventTimestamp) |
insert_id string | Optional. A unique identifier for the event. Amplitude deduplicates subsequent events sent with the same device_id and insert_id within the past 7 days. Default mapping:event?.event_id |
time integer | Optional. The timestamp of the event in milliseconds since epoch. If time isn't sent with the event, then it's set to the request upload time. Default mapping:spTstampToEpochMillis(event?.derived_tstamp) |
event_properties object | Optional. Arbitrary key-value pairs assigned to the event. |
user_properties object | Optional. Arbitrary key-value pairs assigned to the user. |
groups object | Optional. Arbitrary key-value pairs representing groups of users. |
group_properties object | Optional. Arbitrary key-value pairs assigned to the groups listed in the |
$skip_user_properties_sync boolean | Optional. When true user properties aren't synced. Defaults to false. Default mapping:false |
app_version string | Optional. The current version of your application. Default mapping:event?.contexts_com_snowplowanalytics_mobile_application_1?.[0]?.version |
platform string | Optional. Platform of the device. Default mapping:event?.platform |
os_name string | Optional. The name of the mobile operating system or browser that the user is using. Default mapping:event?.os_name |
os_version string | Optional. The version of the mobile operating system or browser the user is using. Default mapping:event?.contexts_nl_basjes_yauaa_context_1?.[0]?.operatingSystemVersion |
device_brand string | Optional. The device brand that the user is using. Default mapping:event?.contexts_nl_basjes_yauaa_context_1?.[0]?.deviceBrand |
device_manufacturer string | Optional. The device manufacturer that the user is using. |
device_model string | Optional. The device model that the user is using. Default mapping:event?.contexts_nl_basjes_yauaa_context_1?.[0]?.deviceName |
carrier string | Optional. The carrier that the user is using. Default mapping:event?.contexts_nl_basjes_yauaa_context_1?.[0]?.carrier |
country string | Optional. The current country of the user. Default mapping:event?.geo_country |
region string | Optional. The current region of the user. Default mapping:event?.geo_region |
city string | Optional. The current city of the user. Default mapping:event?.geo_city |
dma string | Optional. The current Designated Market Area of the user. |
language string | Optional. The language set by the user. Default mapping:event?.br_lang |
price number | Optional. The price of the item purchased. Required for revenue data if the revenue field isn't sent. You can use negative values for refunds |
quantity integer | Optional. The quantity of the item purchased. |
revenue number | Optional. Revenue = (price x quantity). If you send all 3 fields of price, quantity, and revenue, then the revenue value is (price x quantity). Use negative values for refunds. |
productId string | Optional. An identifier for the item purchased. You must send a price and quantity or revenue with this field. |
revenueType string | Optional. The type of revenue for the item purchased. You must send a price and quantity or revenue with this field. |
location_lat number | Optional. The current Latitude of the user. Default mapping:event?.geo_latitude |
location_lng number | Optional. The current Longitude of the user. Default mapping:event?.geo_longitude |
ip string | Optional. The IP address of the user. Default mapping:event?.user_ipaddress |
idfa string | Optional. (iOS) Identifier for Advertiser. Default mapping:event?.contexts_com_snowplowanalytics_snowplow_mobile_context_1?.[0]?.appleIdfa |
idfv string | Optional. (iOS) Identifier for Vendor. Default mapping:event?.contexts_com_snowplowanalytics_snowplow_mobile_context_1?.[0]?.appleIdfv |
adid string | Optional. (Android) Google Play Services advertising ID. Default mapping:event?.contexts_com_snowplowanalytics_snowplow_mobile_context_1?.[0]?.androidIdf |
android_id string | Optional. (Android) Android ID (not the advertising ID). |
plan object | Optional. Tracking plan properties. Properties:
|