Mandala
Tools

Amplitude

Track events and query analytics from Amplitude

Usage Instructions

Integrate Amplitude into your workflow to track events, identify users and groups, search for users, query analytics, analyze funnels and retention, and retrieve revenue data.

Tools

amplitude_send_event

Track an event in Amplitude using the HTTP V2 API.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
userIdstringNoUser ID (required if no device_id)
deviceIdstringNoDevice ID (required if no user_id)
eventTypestringYesName of the event (e.g., "page_view", "purchase")
eventPropertiesstringNoJSON object of custom event properties
userPropertiesstringNoJSON object of user properties to set (supports $set, $setOnce, $add, $append, $unset)
timestringNoEvent timestamp in milliseconds since epoch
sessionIdstringNoSession start time in milliseconds since epoch
insertIdstringNoUnique ID for deduplication (within 7-day window)
appVersionstringNoApplication version string
platformstringNoPlatform (e.g., "Web", "iOS", "Android")
countrystringNoTwo-letter country code
languagestringNoLanguage code (e.g., "en")
ipstringNoIP address for geo-location
pricestringNoPrice of the item purchased
quantitystringNoQuantity of items purchased
revenuestringNoRevenue amount
productIdstringNoProduct identifier
revenueTypestringNoRevenue type (e.g., "purchase", "refund")
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
codenumberResponse code (200 for success)
eventsIngestednumberNumber of events ingested
payloadSizeBytesnumberSize of the payload in bytes
serverUploadTimenumberServer upload timestamp

amplitude_identify_user

Set user properties in Amplitude using the Identify API. Supports $set, $setOnce, $add, $append, $unset operations.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
userIdstringNoUser ID (required if no device_id)
deviceIdstringNoDevice ID (required if no user_id)
userPropertiesstringYesJSON object of user properties. Use operations like $set, $setOnce, $add, $append, $unset.
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
codenumberHTTP response status code
messagestringResponse message

amplitude_group_identify

Set group-level properties in Amplitude. Supports $set, $setOnce, $add, $append, $unset operations.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
groupTypestringYesGroup classification (e.g., "company", "org_id")
groupValuestringYesSpecific group identifier (e.g., "Acme Corp")
groupPropertiesstringYesJSON object of group properties. Use operations like $set, $setOnce, $add, $append, $unset.
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
codenumberHTTP response status code
messagestringResponse message

Search for a user by User ID, Device ID, or Amplitude ID using the Dashboard REST API.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
userstringYesUser ID, Device ID, or Amplitude ID to search for
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
matchesarrayList of matching users
typestringMatch type (e.g., match_user_or_device_id)

amplitude_user_activity

Get the event stream for a specific user by their Amplitude ID.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
amplitudeIdstringYesAmplitude internal user ID
offsetstringNoOffset for pagination (default 0)
limitstringNoMaximum number of events to return (default 1000, max 1000)
directionstringNoSort direction: "latest" or "earliest" (default: latest)
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
eventsarrayList of user events
userDatajsonUser metadata

amplitude_user_profile

Get a user profile including properties, cohort memberships, and computed properties. Not available for EU data-residency projects.

Input

ParameterTypeRequiredDescription
secretKeystringYesAmplitude Secret Key
userIdstringNoExternal user ID (required if no device_id)
deviceIdstringNoDevice ID (required if no user_id)
getAmpPropsstringNoInclude Amplitude user properties (true/false, default: false)
getCohortIdsstringNoInclude cohort IDs the user belongs to (true/false, default: false)
getComputationsstringNoInclude computed user properties (true/false, default: false)

Output

ParameterTypeDescription
userIdstringExternal user ID
deviceIdstringDevice ID
ampPropsjsonAmplitude user properties (library, first_used, last_used, custom properties)
cohortIdsarrayList of cohort IDs the user belongs to
computationsjsonComputed user properties

amplitude_event_segmentation

Query event analytics data with segmentation. Get event counts, uniques, averages, and more.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
eventTypestringYesEvent type name to analyze
startstringYesStart date in YYYYMMDD format
endstringYesEnd date in YYYYMMDD format
metricstringNoMetric type: uniques, totals, pct_dau, average, histogram, sums, value_avg, or formula (default: uniques)
intervalstringNoTime interval: 1 (daily), 7 (weekly), or 30 (monthly)
groupBystringNoProperty name to group by (prefix custom user properties with "gp:")
groupBy2stringNoSecond property name to group by (prefix custom user properties with "gp:")
limitstringNoMaximum number of group-by values (max 1000)
filtersstringNoJSON array of filter objects applied to the event, e.g. [{"subprop_type":"event","subprop_key":"city","subprop_op":"is","subprop_value":["San Francisco"]}]
formulastringNoRequired when metric is "formula", e.g. "UNIQUES(A)/UNIQUES(B)"
segmentstringNoJSON segment definition(s) applied to the query
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
seriesjsonTime-series data arrays indexed by series
seriesLabelsarrayLabels for each data series
seriesCollapsedjsonCollapsed aggregate totals per series
xValuesarrayDate values for the x-axis

amplitude_get_active_users

Get active or new user counts over a date range from the Dashboard REST API.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
startstringYesStart date in YYYYMMDD format
endstringYesEnd date in YYYYMMDD format
metricstringNoMetric type: "active" or "new" (default: active)
intervalstringNoTime interval: 1 (daily), 7 (weekly), or 30 (monthly)
groupBystringNoProperty name to group by
segmentstringNoJSON segment definition(s) applied to the query
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
seriesjsonArray of data series with user counts per time interval
seriesMetaarrayMetadata labels for each data series (e.g., segment names)
xValuesarrayDate values for the x-axis

amplitude_realtime_active_users

Get real-time active user counts at 5-minute granularity for the last 2 days.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
seriesjsonArray of data series with active user counts at 5-minute intervals
seriesLabelsarrayLabels for each series (e.g., "Today", "Yesterday")
xValuesarrayTime values for the x-axis (e.g., "15:00", "15:05")

amplitude_list_events

List all event types in the Amplitude project with their weekly totals and unique counts.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
eventsarrayList of event types in the project

amplitude_get_revenue

Get revenue LTV data including ARPU, ARPPU, total revenue, and paying user counts.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
startstringYesStart date in YYYYMMDD format
endstringYesEnd date in YYYYMMDD format
metricstringNoMetric: 0 (ARPU), 1 (ARPPU), 2 (Total Revenue), 3 (Paying Users)
intervalstringNoTime interval: 1 (daily), 7 (weekly), or 30 (monthly)
groupBystringNoProperty name to group by (limit: one)
segmentstringNoJSON segment definition(s) applied to the query
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
seriesarrayRevenue data series [{dates: [YYYY-MM-DD], values: {<date>: {r1d..r90d, count, paid, total_amount}}}]
seriesLabelsarrayLabels for each data series

amplitude_funnels

Analyze conversion rates and drop-off between a sequence of events.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
eventsstringYesJSON array of event objects, one per funnel step in order, e.g. [{"event_type":"signup"},{"event_type":"purchase"}]
startstringYesStart date in YYYYMMDD format
endstringYesEnd date in YYYYMMDD format
modestringNoFunnel ordering: "ordered", "unordered", or "sequential" (default: ordered)
userTypestringNoUser type: "new" or "active" (default: active)
intervalstringNoTime interval: -300000 (real-time), -3600000 (hourly), 1 (daily), 7 (weekly), or 30 (monthly)
conversionWindowSecondsstringNoConversion window in seconds (default: 2592000, i.e. 30 days)
groupBystringNoProperty to group by (limit: one; prefix custom properties with "gp:")
limitstringNoMaximum number of group-by values (default: 100, max: 1000)
segmentstringNoJSON segment definition(s) applied to the query
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
funnelsarrayFunnel results, one entry per segment

amplitude_retention

Measure how many users return to perform an action after a starting action.

Input

ParameterTypeRequiredDescription
apiKeystringYesAmplitude API Key
secretKeystringYesAmplitude Secret Key
startEventstringYesJSON starting event object, e.g. {"event_type":"_new"} or {"event_type":"_active"}
returnEventstringYesJSON returning event object, e.g. {"event_type":"_all"} or {"event_type":"_active"}
startstringYesStart date in YYYYMMDD format
endstringYesEnd date in YYYYMMDD format
retentionModestringNoRetention type: "bracket", "rolling", or "n-day" (default: n-day)
retentionBracketsstringNoRequired when Retention Mode is "bracket". Day ranges, e.g. [[0,4]]
intervalstringNoTime interval: 1 (daily), 7 (weekly), or 30 (monthly)
groupBystringNoProperty to group by (limit: one; prefix custom properties with "gp:")
segmentstringNoJSON segment definition(s) applied to the query
dataResidencystringNoData residency region: "us" (default) or "eu"

Output

ParameterTypeDescription
seriesarrayRetention data series [{dates, values: {<date>: [{count, outof, incomplete}]}, combined: [{count, outof, incomplete}]}]
seriesMetaarraySegment/event index metadata for each series entry

Notes

  • Category: tools
  • Type: amplitude
Amplitude