Skip to main content

Amplitude

This page describes how to set up Amplitude as a destination.

Set up

An example setup for Amplitude is shown below.

src/pages/api/syft.ts
// ...
const destinations = [
{
type: "amplitude",
settings: {
apiKey: "xxxx",
secretKey: "xxxx"
},
},
];
// ...

Configuration options

NameTypeDescriptionRequiredDefault
apiKeystringAmplitude project API key. You can find this key in the "General" tab of your Amplitude project.true
secretKeystringAmplitude project secret key. You can find this key in the "General" tab of your Amplitude project.true
endpointstringThe region to send your data.falsenorth_america

Data Modeling

Track Calls

Log Event V2

Send an event to Amplitude

Matched events

type = "track" and event != "Order Completed"

Data Mapping

Destination FieldTypeDescriptionSource Field
user_idstringA readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. Note: If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.$.userId
device_idstringA device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.$.context.device.id ?? $.anonymousId
event_typestringA unique identifier for your event.$.event
session_iddatetimeThe start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.$.integrations.Actions Amplitude.session_id
timedatetimeThe timestamp of the event. If time is not sent with the event, it will be set to the request upload time.$.timestamp
event_propertiesobjectAn object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.properties
user_propertiesobjectAn object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.traits
groupsobjectGroups of users for the event as an event-level group. You can only track up to 5 groups. Note: This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.$.groups
app_versionstringThe current version of your application.$.context.app.version
platformstringPlatform of the device.$.context.device.type
os_namestringThe name of the mobile operating system or browser that the user is using.$.context.os.name
os_versionstringThe version of the mobile operating system or browser the user is using.$.context.os.version
device_brandstringThe device brand that the user is using.$.context.device.brand
device_manufacturerstringThe device manufacturer that the user is using.$.context.device.manufacturer
device_modelstringThe device model that the user is using.$.context.device.model
carrierstringThe carrier that the user is using.$.context.network.carrier
countrystringThe current country of the user.$.context.location.country
regionstringThe current region of the user.$.context.location.region
citystringThe current city of the user.$.context.location.city
dmastringThe current Designated Market Area of the user.$.dma
languagestringThe language set by the user.$.context.locale
pricenumberThe price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.$.properties.price
quantityintegerThe quantity of the item purchased. Defaults to 1 if not specified.$.properties.quantity
revenuenumberRevenue = price quantity. If you send all 3 fields of price, quantity, and revenue, then (price quantity) will be used as the revenue value. You can use negative values to indicate refunds. Note: You will need to explicitly set this if you are using the Amplitude in cloud-mode.$.properties.revenue
productIdstringAn identifier for the item purchased. You must send a price and quantity or revenue with this field.$.properties.productId
revenueTypestringThe type of revenue for the item purchased. You must send a price and quantity or revenue with this field.$.properties.revenueType
location_latnumberThe current Latitude of the user.$.context.location.latitude
location_lngnumberThe current Longitude of the user.$.context.location.longitude
ipstringThe IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.$.context.ip
idfastringIdentifier for Advertiser. (iOS)$.context.device.advertisingId ?? $.context.device.idfa
idfvstringIdentifier for Vendor. (iOS)$.context.device.id
adidstringGoogle Play Services advertising ID. (Android)$.context.device.advertisingId ?? $.context.device.idfa
android_idstringAndroid ID (not the advertising ID). (Android)$.android_id
event_idintegerAn incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.$.event_id
insert_idstringAmplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.$.insert_id
librarystringThe name of the library that generated the event.$.context.library.name
productsobjectThe list of products purchased.
{
"@arrayPath": [
"$.properties.products",
{
"price": {
"@path": "price"
},
"revenue": {
"@path": "revenue"
},
"quantity": {
"@path": "quantity"
},
"productId": {
"@path": "productId"
},
"revenueType": {
"@path": "revenueType"
}
}
]
}
setOnceobjectThe following fields will be set only once per session when using AJS2 as the source.
{
"initial_referrer": {
"@path": "$.context.page.referrer"
},
"initial_utm_source": {
"@path": "$.context.campaign.source"
},
"initial_utm_medium": {
"@path": "$.context.campaign.medium"
},
"initial_utm_campaign": {
"@path": "$.context.campaign.name"
},
"initial_utm_term": {
"@path": "$.context.campaign.term"
},
"initial_utm_content": {
"@path": "$.context.campaign.content"
}
}
setAlwaysobjectThe following fields will be set every session when using AJS2 as the source.
{
"referrer": {
"@path": "$.context.page.referrer"
},
"utm_source": {
"@path": "$.context.campaign.source"
},
"utm_medium": {
"@path": "$.context.campaign.medium"
},
"utm_campaign": {
"@path": "$.context.campaign.name"
},
"utm_term": {
"@path": "$.context.campaign.term"
},
"utm_content": {
"@path": "$.context.campaign.content"
}
}
addobjectIncrement a user property by a number with add. If the user property doesn't have a value set yet, it's initialized to 0.$.add
use_batch_endpointbooleanIf true, events are sent to Amplitude's batch endpoint rather than their httpapi events endpoint. Enabling this setting may help reduce 429s – or throttling errors – from Amplitude. More information about Amplitude's throttling is available in their docs.false
userAgentstringThe user agent of the device sending the event.$.context.userAgent
userAgentParsingbooleanEnabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field.true
min_id_lengthintegerAmplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.$.min_id_length
,
Order Completed Calls

Log Purchase

Send an event to Amplitude.

Matched events

type = "track" and event = "Order Completed"

Data Mapping

Destination FieldTypeDescriptionSource Field
trackRevenuePerProductbooleanWhen enabled, track revenue with each product within the event. When disabled, track total revenue once for the event.false
user_idstringA readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. Note: If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.$.userId
device_idstringA device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.$.context.device.id ?? $.anonymousId
event_typestringA unique identifier for your event.$.event
session_iddatetimeThe start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.$.integrations.Actions Amplitude.session_id
timedatetimeThe timestamp of the event. If time is not sent with the event, it will be set to the request upload time.$.timestamp
event_propertiesobjectAn object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.properties
user_propertiesobjectAn object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.traits
groupsobjectGroups of users for the event as an event-level group. You can only track up to 5 groups. Note: This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.$.groups
app_versionstringThe current version of your application.$.context.app.version
platformstringPlatform of the device.$.context.device.type
os_namestringThe name of the mobile operating system or browser that the user is using.$.context.os.name
os_versionstringThe version of the mobile operating system or browser the user is using.$.context.os.version
device_brandstringThe device brand that the user is using.$.context.device.brand
device_manufacturerstringThe device manufacturer that the user is using.$.context.device.manufacturer
device_modelstringThe device model that the user is using.$.context.device.model
carrierstringThe carrier that the user is using.$.context.network.carrier
countrystringThe current country of the user.$.context.location.country
regionstringThe current region of the user.$.context.location.region
citystringThe current city of the user.$.context.location.city
dmastringThe current Designated Market Area of the user.$.dma
languagestringThe language set by the user.$.context.locale
pricenumberThe price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.$.properties.price
quantityintegerThe quantity of the item purchased. Defaults to 1 if not specified.$.properties.quantity
revenuenumberRevenue = price quantity. If you send all 3 fields of price, quantity, and revenue, then (price quantity) will be used as the revenue value. You can use negative values to indicate refunds. Note: You will need to explicitly set this if you are using the Amplitude in cloud-mode.$.properties.revenue
productIdstringAn identifier for the item purchased. You must send a price and quantity or revenue with this field.$.properties.productId
revenueTypestringThe type of revenue for the item purchased. You must send a price and quantity or revenue with this field.$.properties.revenueType
location_latnumberThe current Latitude of the user.$.context.location.latitude
location_lngnumberThe current Longitude of the user.$.context.location.longitude
ipstringThe IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.$.context.ip
idfastringIdentifier for Advertiser. (iOS)$.context.device.advertisingId ?? $.context.device.idfa
idfvstringIdentifier for Vendor. (iOS)$.context.device.id
adidstringGoogle Play Services advertising ID. (Android)$.context.device.advertisingId ?? $.context.device.idfa
android_idstringAndroid ID (not the advertising ID). (Android)$.android_id
event_idintegerAn incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.$.event_id
insert_idstringAmplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.$.insert_id
librarystringThe name of the library that generated the event.$.context.library.name
productsobjectThe list of products purchased.
{
"@arrayPath": [
"$.properties.products",
{
"price": {
"@path": "price"
},
"revenue": {
"@path": "revenue"
},
"quantity": {
"@path": "quantity"
},
"productId": {
"@path": "productId"
},
"revenueType": {
"@path": "revenueType"
}
}
]
}
use_batch_endpointbooleanIf true, events are sent to Amplitude's batch endpoint rather than their httpapi events endpoint. Enabling this setting may help reduce 429s – or throttling errors – from Amplitude. More information about Amplitude's throttling is available in their docs.false
userAgentstringThe user agent of the device sending the event.$.context.userAgent
userAgentParsingbooleanEnabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent fieldtrue
utm_propertiesobjectUTM Tracking Properties
{
"utm_source": {
"@path": "$.context.campaign.source"
},
"utm_medium": {
"@path": "$.context.campaign.medium"
},
"utm_campaign": {
"@path": "$.context.campaign.name"
},
"utm_term": {
"@path": "$.context.campaign.term"
},
"utm_content": {
"@path": "$.context.campaign.content"
}
}
referrerstringThe referrer of the web request. Sent to Amplitude as both last touch “referrer” and first touch “initial_referrer”$.context.page.referrer
min_id_lengthintegerAmplitude has a default minimum id lenght of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.$.min_id_length
,
Page Calls

Log Event V2

Send an event to Amplitude

Matched events

type = "page"

Data Mapping

Destination FieldTypeDescriptionSource Field
user_idstringA readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. Note: If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.$.userId
device_idstringA device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.$.context.device.id ?? $.anonymousId
event_typestringA unique identifier for your event."Viewed $.name"
session_iddatetimeThe start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.$.integrations.Actions Amplitude.session_id
timedatetimeThe timestamp of the event. If time is not sent with the event, it will be set to the request upload time.$.timestamp
event_propertiesobjectAn object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.properties
user_propertiesobjectAn object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.traits
groupsobjectGroups of users for the event as an event-level group. You can only track up to 5 groups. Note: This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.$.groups
app_versionstringThe current version of your application.$.context.app.version
platformstringPlatform of the device.$.context.device.type
os_namestringThe name of the mobile operating system or browser that the user is using.$.context.os.name
os_versionstringThe version of the mobile operating system or browser the user is using.$.context.os.version
device_brandstringThe device brand that the user is using.$.context.device.brand
device_manufacturerstringThe device manufacturer that the user is using.$.context.device.manufacturer
device_modelstringThe device model that the user is using.$.context.device.model
carrierstringThe carrier that the user is using.$.context.network.carrier
countrystringThe current country of the user.$.context.location.country
regionstringThe current region of the user.$.context.location.region
citystringThe current city of the user.$.context.location.city
dmastringThe current Designated Market Area of the user.$.dma
languagestringThe language set by the user.$.context.locale
pricenumberThe price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.$.properties.price
quantityintegerThe quantity of the item purchased. Defaults to 1 if not specified.$.properties.quantity
revenuenumberRevenue = price quantity. If you send all 3 fields of price, quantity, and revenue, then (price quantity) will be used as the revenue value. You can use negative values to indicate refunds. Note: You will need to explicitly set this if you are using the Amplitude in cloud-mode.$.properties.revenue
productIdstringAn identifier for the item purchased. You must send a price and quantity or revenue with this field.$.properties.productId
revenueTypestringThe type of revenue for the item purchased. You must send a price and quantity or revenue with this field.$.properties.revenueType
location_latnumberThe current Latitude of the user.$.context.location.latitude
location_lngnumberThe current Longitude of the user.$.context.location.longitude
ipstringThe IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.$.context.ip
idfastringIdentifier for Advertiser. (iOS)$.context.device.advertisingId ?? $.context.device.idfa
idfvstringIdentifier for Vendor. (iOS)$.context.device.id
adidstringGoogle Play Services advertising ID. (Android)$.context.device.advertisingId ?? $.context.device.idfa
android_idstringAndroid ID (not the advertising ID). (Android)$.android_id
event_idintegerAn incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.$.event_id
insert_idstringAmplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.$.insert_id
librarystringThe name of the library that generated the event.$.context.library.name
productsobjectThe list of products purchased.
{
"@arrayPath": [
"$.properties.products",
{
"price": {
"@path": "price"
},
"revenue": {
"@path": "revenue"
},
"quantity": {
"@path": "quantity"
},
"productId": {
"@path": "productId"
},
"revenueType": {
"@path": "revenueType"
}
}
]
}
setOnceobjectThe following fields will be set only once per session when using AJS2 as the source.
{
"initial_referrer": {
"@path": "$.context.page.referrer"
},
"initial_utm_source": {
"@path": "$.context.campaign.source"
},
"initial_utm_medium": {
"@path": "$.context.campaign.medium"
},
"initial_utm_campaign": {
"@path": "$.context.campaign.name"
},
"initial_utm_term": {
"@path": "$.context.campaign.term"
},
"initial_utm_content": {
"@path": "$.context.campaign.content"
}
}
setAlwaysobjectThe following fields will be set every session when using AJS2 as the source.
{
"referrer": {
"@path": "$.context.page.referrer"
},
"utm_source": {
"@path": "$.context.campaign.source"
},
"utm_medium": {
"@path": "$.context.campaign.medium"
},
"utm_campaign": {
"@path": "$.context.campaign.name"
},
"utm_term": {
"@path": "$.context.campaign.term"
},
"utm_content": {
"@path": "$.context.campaign.content"
}
}
addobjectIncrement a user property by a number with add. If the user property doesn't have a value set yet, it's initialized to 0.$.add
use_batch_endpointbooleanIf true, events are sent to Amplitude's batch endpoint rather than their httpapi events endpoint. Enabling this setting may help reduce 429s – or throttling errors – from Amplitude. More information about Amplitude's throttling is available in their docs.false
userAgentstringThe user agent of the device sending the event.$.context.userAgent
userAgentParsingbooleanEnabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field.true
min_id_lengthintegerAmplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.$.min_id_length
,
Screen Calls

Log Event V2

Send an event to Amplitude

Matched events

type = "screen"

Data Mapping

Destination FieldTypeDescriptionSource Field
user_idstringA readable ID specified by you. Must have a minimum length of 5 characters. Required unless device ID is present. Note: If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event.$.userId
device_idstringA device-specific identifier, such as the Identifier for Vendor on iOS. Required unless user ID is present. If a device ID is not sent with the event, it will be set to a hashed version of the user ID.$.context.device.id ?? $.anonymousId
event_typestringA unique identifier for your event."Viewed $.name"
session_iddatetimeThe start time of the session, necessary if you want to associate events with a particular system. To use automatic Amplitude session tracking in browsers, enable Analytics 2.0 on your connected source.$.integrations.Actions Amplitude.session_id
timedatetimeThe timestamp of the event. If time is not sent with the event, it will be set to the request upload time.$.timestamp
event_propertiesobjectAn object of key-value pairs that represent additional data to be sent along with the event. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.properties
user_propertiesobjectAn object of key-value pairs that represent additional data tied to the user. You can store property values in an array, but note that Amplitude only supports one-dimensional arrays. Date values are transformed into string values. Object depth may not exceed 40 layers.$.traits
groupsobjectGroups of users for the event as an event-level group. You can only track up to 5 groups. Note: This Amplitude feature is only available to Enterprise customers who have purchased the Accounts add-on.$.groups
app_versionstringThe current version of your application.$.context.app.version
platformstringPlatform of the device.$.context.device.type
os_namestringThe name of the mobile operating system or browser that the user is using.$.context.os.name
os_versionstringThe version of the mobile operating system or browser the user is using.$.context.os.version
device_brandstringThe device brand that the user is using.$.context.device.brand
device_manufacturerstringThe device manufacturer that the user is using.$.context.device.manufacturer
device_modelstringThe device model that the user is using.$.context.device.model
carrierstringThe carrier that the user is using.$.context.network.carrier
countrystringThe current country of the user.$.context.location.country
regionstringThe current region of the user.$.context.location.region
citystringThe current city of the user.$.context.location.city
dmastringThe current Designated Market Area of the user.$.dma
languagestringThe language set by the user.$.context.locale
pricenumberThe price of the item purchased. Required for revenue data if the revenue field is not sent. You can use negative values to indicate refunds.$.properties.price
quantityintegerThe quantity of the item purchased. Defaults to 1 if not specified.$.properties.quantity
revenuenumberRevenue = price quantity. If you send all 3 fields of price, quantity, and revenue, then (price quantity) will be used as the revenue value. You can use negative values to indicate refunds. Note: You will need to explicitly set this if you are using the Amplitude in cloud-mode.$.properties.revenue
productIdstringAn identifier for the item purchased. You must send a price and quantity or revenue with this field.$.properties.productId
revenueTypestringThe type of revenue for the item purchased. You must send a price and quantity or revenue with this field.$.properties.revenueType
location_latnumberThe current Latitude of the user.$.context.location.latitude
location_lngnumberThe current Longitude of the user.$.context.location.longitude
ipstringThe IP address of the user. Use "$remote" to use the IP address on the upload request. Amplitude will use the IP address to reverse lookup a user's location (city, country, region, and DMA). Amplitude has the ability to drop the location and IP address from events once it reaches our servers. You can submit a request to Amplitude's platform specialist team here to configure this for you.$.context.ip
idfastringIdentifier for Advertiser. (iOS)$.context.device.advertisingId ?? $.context.device.idfa
idfvstringIdentifier for Vendor. (iOS)$.context.device.id
adidstringGoogle Play Services advertising ID. (Android)$.context.device.advertisingId ?? $.context.device.idfa
android_idstringAndroid ID (not the advertising ID). (Android)$.android_id
event_idintegerAn incrementing counter to distinguish events with the same user ID and timestamp from each other. Amplitude recommends you send an event ID, increasing over time, especially if you expect events to occur simultanenously.$.event_id
insert_idstringAmplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.$.insert_id
librarystringThe name of the library that generated the event.$.context.library.name
productsobjectThe list of products purchased.
{
"@arrayPath": [
"$.properties.products",
{
"price": {
"@path": "price"
},
"revenue": {
"@path": "revenue"
},
"quantity": {
"@path": "quantity"
},
"productId": {
"@path": "productId"
},
"revenueType": {
"@path": "revenueType"
}
}
]
}
setOnceobjectThe following fields will be set only once per session when using AJS2 as the source.
{
"initial_referrer": {
"@path": "$.context.page.referrer"
},
"initial_utm_source": {
"@path": "$.context.campaign.source"
},
"initial_utm_medium": {
"@path": "$.context.campaign.medium"
},
"initial_utm_campaign": {
"@path": "$.context.campaign.name"
},
"initial_utm_term": {
"@path": "$.context.campaign.term"
},
"initial_utm_content": {
"@path": "$.context.campaign.content"
}
}
setAlwaysobjectThe following fields will be set every session when using AJS2 as the source.
{
"referrer": {
"@path": "$.context.page.referrer"
},
"utm_source": {
"@path": "$.context.campaign.source"
},
"utm_medium": {
"@path": "$.context.campaign.medium"
},
"utm_campaign": {
"@path": "$.context.campaign.name"
},
"utm_term": {
"@path": "$.context.campaign.term"
},
"utm_content": {
"@path": "$.context.campaign.content"
}
}
addobjectIncrement a user property by a number with add. If the user property doesn't have a value set yet, it's initialized to 0.$.add
use_batch_endpointbooleanIf true, events are sent to Amplitude's batch endpoint rather than their httpapi events endpoint. Enabling this setting may help reduce 429s – or throttling errors – from Amplitude. More information about Amplitude's throttling is available in their docs.false
userAgentstringThe user agent of the device sending the event.$.context.userAgent
userAgentParsingbooleanEnabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent field.true
min_id_lengthintegerAmplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.$.min_id_length
,
Identify Calls

Identify User

Set the user ID for a particular device ID or update user properties without sending an event to Amplitude.

Matched events

type = "identify"

Data Mapping

Destination FieldTypeDescriptionSource Field
user_idstringA UUID (unique user ID) specified by you. Note: If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event. Required unless device ID is present.$.userId
device_idstringA device specific identifier, such as the Identifier for Vendor (IDFV) on iOS. Required unless user ID is present.$.context.device.id ?? $.anonymousId
user_propertiesobjectAdditional data tied to the user in Amplitude. Each distinct value will show up as a user syft on the Amplitude dashboard. Object depth may not exceed 40 layers. Note: You can store property values in an array and date values are transformed into string values.$.traits
groupsobjectGroups of users for Amplitude's account-level reporting feature. Note: You can only track up to 5 groups. Any groups past that threshold will not be tracked. Note: This feature is only available to Amplitude Enterprise customers who have purchased the Amplitude Accounts add-on.$.groups
app_versionstringVersion of the app the user is on.$.context.app.version
platformstringThe platform of the user's device.$.context.device.type
os_namestringThe mobile operating system or browser of the user's device.$.context.os.name
os_versionstringThe version of the mobile operating system or browser of the user's device.$.context.os.version
device_brandstringThe brand of user's the device.$.context.device.brand
device_manufacturerstringThe manufacturer of the user's device.$.context.device.manufacturer
device_modelstringThe model of the user's device.$.context.device.model
carrierstringThe user's mobile carrier.$.context.network.carrier
countrystringThe country in which the user is located.$.context.location.country
regionstringThe geographical region in which the user is located.$.context.location.region
citystringThe city in which the user is located.$.context.location.city
dmastringThe Designated Market Area in which the user is located.$.dma
languagestringLanguage the user has set on their device or browser.$.context.locale
payingbooleanWhether the user is paying or not.$.paying
start_versionstringThe version of the app the user was first on.$.start_version
insert_idstringAmplitude will deduplicate subsequent events sent with this ID we have already seen before within the past 7 days. Amplitude recommends generating a UUID or using some combination of device ID, user ID, event type, event ID, and time.$.insert_id
userAgentstringThe user agent of the device sending the event.$.context.userAgent
userAgentParsingbooleanEnabling this setting will set the Device manufacturer, Device Model and OS Name properties based on the user agent string provided in the userAgent fieldtrue
utm_propertiesobjectUTM Tracking Properties
{
"utm_source": {
"@path": "$.context.campaign.source"
},
"utm_medium": {
"@path": "$.context.campaign.medium"
},
"utm_campaign": {
"@path": "$.context.campaign.name"
},
"utm_term": {
"@path": "$.context.campaign.term"
},
"utm_content": {
"@path": "$.context.campaign.content"
}
}
referrerstringThe referrer of the web request. Sent to Amplitude as both last touch “referrer” and first touch “initial_referrer”$.context.page.referrer
min_id_lengthintegerAmplitude has a default minimum id length of 5 characters for user_id and device_id fields. This field allows the minimum to be overridden to allow shorter id lengths.$.min_id_length
librarystringThe name of the library that generated the event.$.context.library.name
,