Amplitude
Last updated
Last updated
Integrate Nami with Amplitude so you can send data from Nami to other services that you use and build audiences based on Nami ML attributes.
Our Amplitude integration is available on our paid plans. Please contact us if you are interested in this feature.
This is a server-side integration where Nami sends data directly to Amplitude. There is minimal SDK work required to enable it. See the User ID section below.
Nami uses Amplitude HTTP V2 to send events. To prepare to setup the Nami to Amplitude integration, you need a few things from your Amplitude dashboard.
To get started, you will need to locate the Amplitude project that you want to send Nami data to. Navigate to Amplitude > **Organization Settings **> Projects
On this screen copy and save the API Key and the Secret Key. You'll need these to set up Amplitude in the Nami Control Center in the next section.
In the Nami Control Center, you'll need to set up 1 Amplitude integration for each app. For example if you have a staging
and production
app on Nami, you may want to send data for each to Amplitude.
Log in to the Nami Control Center and Navigate to the Integrations screen. Then scroll down to All Integrations and click the Amplitude tile.
On the next screen toggle on Enable Integration.
Enter a Name for the integration
Enter your Amplitude Endpoint for the URL field
Standard Endpoint - https://api2.amplitude.com/2/httpapi
EU Residency Endpoint - https://api.eu.amplitude.com/2/httpapi
Enter the API Key you located from the Amplitude dashboard.
Select a value to use for the User ID in the dropdown.
Most apps will use External ID
for the User ID in this step. For more details on the User ID, see the Amplitude User ID section.
Select the Nami events you wish to send to Amplitude in the last section of the screen by expanding and clicking the checkboxes. An overview of these data is provided in the next section. When complete click Add New Integration.
Click 'Add New Integration' to save your changes
The following events generated by the Nami ML platform are currently available to be sent to Amplitude. You may choose any subset of these events to be sent.
device.impression
device.transaction
user.journey.trial.converted
user.journey.trial.did_not_convert
user.journey.trial.started
user.purchases.updated
user.subscription.account_hold
user.subscription.cancelled
user.subscription.expired
user.subscription.in_grace_period
user.subscription.paused
user.subscription.purchased
user.subscription.renewal_in_grace_period
user.subscription.renewed
user.subscription.resubscribed
user.subscription.resumed
See our full list of Event Types here as well as more documentation on how to interpret each event.
Amplitude uses a User ID field to define users in their platform. It is important that you properly set this ID in the Nami ML platform so that users in our platform are properly linked with users in Amplitude.
There are 2 different IDs that are available to be used as the Customer ID.
Nami User ID This is Nami's internal ID that tracks a user in our platform. If you have no other identifier you may use this.
External ID This is the identifier that you set in the SDK with a call to login. We expect most customers to use the External ID for the Amplitude User ID.
We provide the following user attributes on all user.subscription.*
events sent to Amplitude.
namiml_active_entitlements
Array of entitlement_ref_id
's for each active entitlement that the user currently has access to.
namiml_active_skus
Array of sku_ref_id
's for the associated purchases with each active entitlement the user currently has access to.
namiml_device_ids
Array of UUIDs for each device that belongs to the user.
namiml_device_platforms
Array of app_platform_id
's for each device.
namiml_former_subscriber
True if the user previously paid for a subscription and currently does not have an active subscription.
namiml_in_grace_period
True if the user is currently in grace period, false otherwise.
namiml_in_trial_period
True if the user is currently in a free trial, false otherwise.
namiml_in_intro_offer_period
True if the user is currently in an intro offer period, false otherwise.
We provide the following user attributes on the user.purchases.updated
event sent to Amplitude.
nami_active_entitlements
Array of entitlements the user currently has access to
nami_external_id
If the user is registered/signed in and their identifier is passed to the Nami SDK, this field will be populated.
nami_purchases
Array of all known purchases for this user
nami_subscriber_status
A roll-up of the user's subscriber status across all known purchases.
nami_user_id
Nami's internal identifier for this user
nami_user_type
Nami's internal user identifier type for this user
Here are the fields for nami_active_entitlements
objects:
description
Description of the entitlement as specified in the Nami Control Center. String field.
entitlement_id
Nami's guid identifier for the entitlement String field
entitlement_ref_id
A slug-style identifier for the entitlement. String field
expires_at
Timestamp for when the entitlement expires. String or ISO 8601 Date
name
Name of the entitlement as specified in the Nami Control Center. String field.
type
The type of entitlement. String or Enum field. Possible values are:
binary_auth - you have it or you do not
quota_limit - you have it up to a limit
consumable - a bucket of resources you consume from until depleted
Here are the fields for nami_purchases
objects:
Some fields may not be populated or may have an incorrect value (e.g. is_free_trial_conversion) if the original purchase happened before Nami had visibility into the purchase.
billing_cycles
The number of billing cycles, if a subscription. Number field.
billing_platform_type
The billing platform used to make the purchase. Stripe or Enum field. Possible values are:
amazon_iap - Amazon Appstore
apple - Apple App Store
google - Google Play
roku_pay - Roku Pay
web - Web
canceled_at
If a subscription, and canceled, the date and time when the cancelation occured . String or ISO 8601 Date
current_term_length
If a subscription, the current term length in ISO 8601 period format (e.g. P1Y)
entitlements
A list of entitlements this purchase unlocks. Array field.
expires_at
If a subscription, the date and time it expires. String or ISO 8601 Date
free_trial_length
If a subscription with a free trial, the length of the free trial in ISO 8601 period format (e.g. P7D).
in_account_hold
If a subscription, is it currently in account hold? Boolean field.
in_pause
If a subscription, is it currently paused? Boolean field.
in_payment_grace_period
If a subscription, is it currently in billing grace period? Boolean field.
is_active
If a subscription, is it currently active? Boolean field.
is_auto_renewable
If a subscription, is it auto-renewing? Boolean field.
is_free_trial_conversion
If a subscription, is it a free trial conversion? Boolean field.
is_in_intro_offer_period
If a subscription, is it currently in an introductory offer period? Boolean field.
is_in_trial_period
If a subscription, is it currently in an a free trial period? Boolean field.
is_production
Was this purchase made in production or a sandbox environment? Boolean field
is_subscription
Is this purchase a subscription? Boolean field
most_recent_event
The most recent event that updated this purchase record. String field
most_recent_transaction_id
Most recent transaction id from the billing provider for this purchase. String field
original_transaction_id
The original transaction id from the billing provider for this purchase. String field
price_in_usd
The price of the product being purchased, in US dollars. String field
product_ref_id
The purchased product identifier with the billing platform. String field
purchase_currency
The currency the purchase was made in. String field
purchase_price
The price of the purchase in the currency the purchase was made in. String field
revoked_at
If a subscription, the date and time it was revoked in the case of a refund or involuntary churn event. String or ISO 8601 Date
Here are the fields for nami_subscriber_status
object, which rolls up subscriber status across all known purchases:
active_subscriber
Is this user an active subscriber? Boolean field.
former_subscriber
Is this user a former subscriber? Boolean field.
in_account_hold
Does this user have a subscription currently in account hold? Boolean field.
in_grace_period
Does this user have a subscription currently in a billing grace period? Boolean field.
in_intro_offer_period
Does this user currently have a subscription with an active introductory offer? Boolean field.
in_pause
Does this user have a subscription that is currently paused? Boolean field.
in_trial_period
Does this user currently have a subscription with an active trial offer? Boolean field.
is_canceled
Does this user have a subscription that is currently canceled? Boolean field.
For more information, see the documentation on Amplitude's website.