Amplitude

What Is Amplitude?

Amplitude is a product analytics platform that helps businesses understand user behavior across digital products. It provides real-time insights and advanced analytics to track user interactions, measure user engagement, and optimize product experiences. Amplitude's features include event tracking, user segmentation, cohort analysis, and A/B testing. It enables data-driven decision-making by offering powerful visualizations and integrations with other tools. Businesses use Amplitude to enhance customer retention, improve user acquisition, and drive growth through data-informed strategies.

What are the benefits of integrating MetaRouter with Amplitude?

  • Streamlined Data Delivery: MetaRouter's server-side connection ensures all events and parameters are accurately delivered to Amplitude, eliminating the need for client-side tags and reducing potential data loss or discrepancies.
  • Improved Site Performance: By removing the Amplitude tag from the site, MetaRouter integration can enhance site speed and performance, leading to a better user experience.
  • Enhanced Data Security: Server-side data transmission through MetaRouter enhances security by minimizing the exposure of data to client-side vulnerabilities and ensuring compliance with privacy regulations.

Amplitude Notes and Considerations

  • If you are using this integration for the EU, please contact your MetaRouter support team. They will assist you in making the necessary adjustments to serve the EU endpoint.

Getting Started - From Your Amplitude Account

API Key

  • Please refer to the Amplitude guide on API Authentication to obtain your API Key.

Getting Started - From Your MetaRouter Account

Adding an Amplitude integration.

From the integration library, add an Amplitude integration. Then, fill out the Connection Parameters:

Connection ParameterDescription
API_KEYAPI key from your Amplitude account.
API_URLDefault API URL set to https://api2.amplitude.com. Change to https://api.eu.amplitude.com for EU residency.

Event Mappings

MetaRouter provides all of the event mappings that Amplitude integrations typically require. You may add custom events, parameters or mappings in accordance with Amplitude’s API documentation.

Global

Global mappings will be applied to all events. If your parameter names do not match the Expected Inputs provided, you will need to overwrite the Inputs provided with your own.

Output Key

Description

Expected Input

partner_id Required

String: The partner ID associated with the event.

metarouter

Event Specific

Identify

Output Key

Description

Expected Input

api_key Required

String: Amplitude API key.

Enrichment - API_KEY

identification
Required

Object: User identification object containing various properties.

N/A - Expression


Page

Output Key

Description

Expected Input

event_type Required

String: A unique identifier for the event.

Enrichment - "Loaded a Page"

user_id
Required

String: A readable ID specified by you.

userId

device_id
Required

String: A device-specific identifier.

anonymousId

insert_id

String: A unique identifier for the event.

messageId

event_properties.category

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.category

event_properties.name

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.name

user_properties.user_id

Object: A dictionary of key-value pairs representing data tied to the user.

userId

user_properties.device_id

Object: A dictionary of key-value pairs representing data tied to the user.

anonymousId

app_version

String: The current version of your application.

context.app.version

os_name

String: The name of the mobile operating system or browser that the user is using.

context.os.name

os_version

String: The version of the mobile operating system or browser the user is using.

context.os.version

device_manufacturer

String: The device manufacturer that the user is using.

context.device.manufacturer

device_model

String: The device model that the user is using.

context.device.model

carrier

String: The carrier that the user is using.

context.network.carrier

ip

String: The IP address of the user.

context.ip

user_agent

String: The user agent string of the browser.

context.userAgent

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer


Products Searched

Output Key

Description

Expected Input

event_type Required

String: A unique identifier for the event.

Enrichment - "Search Completed"

user_id
Required

String: A readable ID specified by you.

userId

device_id
Required

String: A device-specific identifier.

anonymousId

insert_id

String: A unique identifier for the event.

messageId

event_properties.keywords

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.query

user_properties.user_id

Object: A dictionary of key-value pairs representing data tied to the user.

userId

user_properties.device_id

Object: A dictionary of key-value pairs representing data tied to the user.

anonymousId

app_version

String: The current version of your application.

context.app.version

os_name

String: The name of the mobile operating system or browser that the user is using.

context.os.name

os_version

String: The version of the mobile operating system or browser the user is using.

context.os.version

device_manufacturer

String: The device manufacturer that the user is using.

context.device.manufacturer

device_model

String: The device model that the user is using.

context.device.model

carrier

String: The carrier that the user is using.

context.network.carrier

ip

String: The IP address of the user.

context.ip

user_agent

String: The user agent string of the browser.

context.userAgent

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer


Product List Viewed

Output Key

Description

Expected Input

event_type Required

String: A unique identifier for the event.

Enrichment - "product_list_viewed"

user_id
Required

String: A readable ID specified by you.

userId

device_id
Required

String: A device-specific identifier.

anonymousId

insert_id

String: A unique identifier for the event.

messageId

event_properties.list_category

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.category

event_properties.list_id

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.list_id

user_properties.user_id

Object: A dictionary of key-value pairs representing data tied to the user.

userId

user_properties.device_id

Object: A dictionary of key-value pairs representing data tied to the user.

anonymousId

app_version

String: The current version of your application.

context.app.version

os_name

String: The name of the mobile operating system or browser that the user is using.

context.os.name

os_version

String: The version of the mobile operating system or browser the user is using.

context.os.version

device_manufacturer

String: The device manufacturer that the user is using.

context.device.manufacturer

device_model

String: The device model that the user is using.

context.device.model

carrier

String: The carrier that the user is using.

context.network.carrier

ip

String: The IP address of the user.

context.ip

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer


Product Viewed

Output Key

Description

Expected Input

event_type Required

String: A unique identifier for the event.

Enrichment - "product_viewed"

user_id
Required

String: A readable ID specified by you.

userId

device_id
Required

String: A device-specific identifier.

anonymousId

insert_id

String: A unique identifier for the event.

messageId

event_properties.product_name

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.name

event_properties.product_sku

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.sku

event_properties.product_id

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.product_id

event_properties.product_category

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.category

event_properties.product_price

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.price

user_properties.user_id

Object: A dictionary of key-value pairs representing data tied to the user.

userId

user_properties.device_id

Object: A dictionary of key-value pairs representing data tied to the user.

anonymousId

app_version

String: The current version of your application.

context.app.version

os_name

String: The name of the mobile operating system or browser that the user is using.

context.os.name

os_version

String: The version of the mobile operating system or browser the user is using.

context.os.version

device_manufacturer

String: The device manufacturer that the user is using.

context.device.manufacturer

device_model

String: The device model that the user is using.

context.device.model

carrier

String: The carrier that the user is using.

context.network.carrier

ip

String: The IP address of the user.

context.ip

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer


Product Added

Output Key

Description

Expected Input

event_type Required

String: A unique identifier for the event.

Enrichment - "product_added"

user_id
Required

String: A readable ID specified by you.

userId

device_id
Required

String: A device-specific identifier.

anonymousId

insert_id

String: A unique identifier for the event.

messageId

event_properties.product_name

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.name

event_properties.product_sku

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.sku

event_properties.product_id

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.product_id

event_properties.product_category

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.category

event_properties.product_price

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.price

event_properties.product_quantity

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.quantity

user_properties.user_id

Object: A dictionary of key-value pairs representing data tied to the user.

userId

user_properties.device_id

Object: A dictionary of key-value pairs representing data tied to the user.

anonymousId

app_version

String: The current version of your application.

context.app.version

os_name

String: The name of the mobile operating system or browser that the user is using.

context.os.name

os_version

String: The version of the mobile operating system or browser the user is using.

context.os.version

device_manufacturer

String: The device manufacturer that the user is using.

context.device.manufacturer

device_model

String: The device model that the user is using.

context.device.model

carrier

String: The carrier that the user is using.

context.network.carrier

ip

String: The IP address of the user.

context.ip

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer


Cart Viewed

Output Key

Description

Expected Input

event_type Required

String: A unique identifier for the event.

Enrichment - "cart_viewed"

user_id
Required

String: A readable ID specified by you.

userId

device_id
Required

String: A device-specific identifier.

anonymousId

insert_id

String: A unique identifier for the event.

messageId

event_properties.cart_id

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.cart_id

user_properties.user_id

Object: A dictionary of key-value pairs representing data tied to the user.

userId

user_properties.device_id

Object: A dictionary of key-value pairs representing data tied to the user.

anonymousId

app_version

String: The current version of your application.

context.app.version

os_name

String: The name of the mobile operating system or browser that the user is using.

context.os.name

os_version

String: The version of the mobile operating system or browser the user is using.

context.os.version

device_manufacturer

String: The device manufacturer that the user is using.

context.device.manufacturer

device_model

String: The device model that the user is using.

context.device.model

carrier

String: The carrier that the user is using.

context.network.carrier

ip

String: The IP address of the user.

context.ip

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer


Order Completed

Output Key

Description

Expected Input

event_type Required

String: A unique identifier for the event.

Enrichment - "order_completed"

user_id
Required

String: A readable ID specified by you.

userId

device_id
Required

String: A device-specific identifier.

anonymousId

insert_id

String: A unique identifier for the event.

messageId

user_properties.user_id

Object: A dictionary of key-value pairs representing data tied to the user.

userId

user_properties.device_id

Object: A dictionary of key-value pairs representing data tied to the user.

anonymousId

app_version

String: The current version of your application.

context.app.version

os_name

String: The name of the mobile operating system or browser that the user is using.

context.os.name

os_version

String: The version of the mobile operating system or browser the user is using.

context.os.version

device_manufacturer

String: The device manufacturer that the user is using.

context.device.manufacturer

device_model

String: The device model that the user is using.

context.device.model

carrier

String: The carrier that the user is using.

context.network.carrier

ip

String: The IP address of the user.

context.ip

user_agent

String: The user agent string of the browser.

context.userAgent

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer

event_properties.cart_id

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.cart_id

event_properties.total_cart_size

Object: The total number of items in the cart.

context.cart_size

event_properties.total_cart_value

Object: The total value of items in the cart.

context.cart_value

event_properties.promo_code_applied

Object: The promo code applied to the order.

properties.coupon

event_properties.order_total

Object: The total value of the order.

properties.total

event_properties.total_discounts

Object: The total discounts applied to the order.

properties.discount

event_properties.order_id

Object: A dictionary of key-value pairs representing properties sent along with the event.

properties.order_id

event_properties.total_shipping

Object: The total shipping cost of the order.

properties.shipping

event_properties.total_tax

Object: The total tax applied to the order.

properties.tax

user_properties.utm_source

Object: UTM source parameter for tracking.

context.campaign.source

user_properties.utm_medium

Object: UTM medium parameter for tracking.

context.campaign.medium

user_properties.utm_campaign

Object: UTM campaign parameter for tracking.

context.campaign.name

user_properties.utm_term

Object: UTM term parameter for tracking.

context.campaign.term

user_properties.utm_content

Object: UTM content parameter for tracking.

context.campaign.content

user_properties.referrer

Object: Referrer URL of the page.

context.page.referrer


Default

Output KeyDescriptionExpected Input
event_typeString: A unique identifier for the event.event
user_idString: A readable ID specified by you.userId
device_idString: A device-specific identifier.anonymousId
insert_idString: A unique identifier for the event.messageId
user_properties.user_idObject: A dictionary of key-value pairs representing data tied to the user.userId
user_properties.device_idObject: A dictionary of key-value pairs representing data tied to the user.anonymousId
app_versionString: The current version of your application.context.app.version
os_nameString: The name of the mobile operating system or browser that the user is using.context.os.name
os_versionString: The version of the mobile operating system or browser the user is using.context.os.version
device_manufacturerString: The device manufacturer that the user is using.context.device.manufacturer
device_modelString: The device model that the user is using.context.device.model
carrierString: The carrier that the user is using.context.network.carrier
ipString: The IP address of the user.context.ip
user_agentString: The user agent string of the browser.context.userAgent
user_properties.utm_sourceObject: UTM source parameter for tracking.context.campaign.source
user_properties.utm_mediumObject: UTM medium parameter for tracking.context.campaign.medium
user_properties.utm_campaignObject: UTM campaign parameter for tracking.context.campaign.name
user_properties.utm_termObject: UTM term parameter for tracking.context.campaign.term
user_properties.utm_contentObject: UTM content parameter for tracking.context.campaign.content
user_properties.referrerObject: Referrer URL of the page.context.page.referrer

Required & Recommended Identifiers

These identifiers must be mapped to Amplitude in order for successful user matching to occur. Without these IDs, any events sent to Amplitude will be rejected. For your convenience, required and recommended IDs are mapped as Global parameters to ensure they are added to every event.

Attribute

Example

Sync Injector Required?

user_id Required

user_123456

No

device_id
Required

abc123xyz

No

insert_id
Recommended

d290f1ee-6c54-4b01-90e6-d701748f0851

No

app_version
Recommended

1.0.0

No

platform
Recommended

iOS

No

os_name
Recommended

iOS

No

os_version
Recommended

13.3.1

No

carrier
Recommended

AT&T

No

device_model
Recommended

iPhone 11”

No

device_manufacturer
Recommended

Apple

No

ip
Recommended

192.168.0.1

No

user_agent
Recommended

Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1

No

Additional Identifiers

These identifiers should be mapped to Amplitude whenever possible to ensure the highest user match rates possible. If using these identifiers, they must be added as Global or Event Specific mappings.

AttributeDescriptionExample
location_latThe latitude of the user's location.37.7749
location_lngThe longitude of the user's location.-122.4194
countryThe country where the user is located.United States
regionThe region where the user is located.California
cityThe city where the user is located.San Francisco
dmaThe Designated Market Area (DMA) of the user.San Francisco-Oakland-San Jose
idfaIdentifier for Advertisers on iOS.6D92078A-8246-4BA4-AE5B-76104861E7DC
idfvIdentifier for Vendor on iOS.AEBE52E7-03EE-455A-B3C4-E57283966239”
adidGoogle Play Services advertising ID on Android.38400000-8cf0-11bd-b23e-10b96e40000d
android_idAndroid ID (not the advertising ID).9774d56d682e549c

Additional Amplitude Documentation

Amplitude - Batch Event Upload API