You can use the identify call to associate a user with their actions and capture all relevant traits about them. This includes a unique userId and other optional information like name, email address, etc.
When sending events from your Reverse ETL sources using Visual Data Mapper, you can also pass a custom user ID in your identify calls.
You can opt out of an identify call in a current session by passing a optOutOfSession trait and setting it to true. If there is no active session, passing optOutOfSession: true does not start a new session.
Unset user properties
To unset the user traits in the traits/context.traits object or userProperties in Amplitude, specify them in the integrations.Amplitude.fieldsToUnset object.
When you unset fields using fieldsToUnset, RudderStack notifies Amplitude to delete the fields along with their schema (if they exist).
If the fields to unset are nested within some object (for example, someField), then specify the full path to the field in the integrations object, as shown:
The page call allows you to record your website’s page views, with the additional relevant information about the viewed page. RudderStack recommends calling this method at least once per page load.
In the above example, RudderStack captures information related to the page being viewed such as the category of the page (Category) and the page name (Sample).
Set custom page event names
You can set custom event names for your page calls. To use this feature, enable the Use Custom Page Event Name dashboard setting and specify the event name format in the Page Event Name Format field.
For example, if you set the event name format as Viewed a {{ name }} and pass the following event:
rudderanalytics.page("Home")
Then, RudderStack sets the event name as Viewed a Home before sending it to Amplitude.
Screen
The screen call lets you record screen views with any additional information about the viewed screen.
A sample screen call looks like the following code snippet:
You can set custom event names for your screen calls. To use this feature, enable the Use Custom Screen Event Name dashboard setting and specify the event name format in the Screen Event Name Format field.
For example, if you set the event name format as Viewed a {{ name }} and pass the following event:
Then, RudderStack sets the event name as Viewed a Main before sending it to Amplitude.
Group
You can use the group event to link an identified user with a group, like a company, organization, or an account.
Note that RudderStack does not support associating a user to more than one group per group call sent to Amplitude.
To send more than one group per user, you must call the group API multiple times with the relevant group information specified in the group settings.
Use Amplitude Groups
Groups are an enterprise-only feature in Amplitude. You need to purchase the Accounts add-on to use this feature.
To use the Amplitude Groups feature with RudderStack:
Configure the Group name trait and Group value trait fields in the Group trait settings.
Pass the above fields as traits in your group events.
Even if you don’t have an enterprise account or the Groups add-on, RudderStack adds groups as a user property in the user’s profile with Group Name Trait as its type and Group Value Trait as its value.
For example, if you define the Group Name Trait as RS and Group Value Trait as RudderStack and make the group call, the user would then be associated with the group name as RS and the group value as RudderStack.
Track
The track call lets you record the user’s actions along with any properties associated with them.
A sample track call looks like the following:
rudderanalytics.track("Track me")
Track revenue events
In cloud mode, RudderStack automatically recognizes a revenue event if a track event has both revenue and revenue_type properties.
You can also mark a revenue event manually by setting the isRevenue property to true in the integrations object.
A sample track call categorized as a revenue event is shown below:
Revenue is tracked as an aggregate at the event level.
Note that the revenueType field is set from either the revenueType or revenue_type property in your event. If not specified, RudderStack defaults its value to Purchased.
Track completed orders
While tracking completed orders with multiple products, RudderStack generates events as follows:
If Track revenue per product setting is enabled: Each product is tracked individually with its own revenue calculation, regardless of the total order revenue.
If Track revenue per product setting is disabled: The total revenue specified at the order level is used.
In both the cases, any discrepancy between the sum of product revenues and the order-level revenue is ignored.
This feature is currently only available when sending events through the JavaScript SDK in cloud mode.
You will need to enable the Amplitude Portfolio add-on to use the alias call.
The alias call lets you merge different identities of a known user. For more information on how the alias call works for Amplitude, see the Amplitude support page.
Amplitude’s alias call creates a mapping or link between the user_id specified in the from parameter to the global_user_id specified in the to parameter of the alias call, as shown:
In the snippet above, user_to_be_unmapped, will be unmapped or unlinked from the global_user_id that it is currently linked to.
For the unmapping user ID, do not provide global_user_id in the to parameter of the alias call, otherwise RudderStack will dismiss this field.
Advanced features
This section covers some advanced features that you can use to enhance your Amplitude cloud mode integration with RudderStack.
Send event_id
RudderStack supports sending event_id to Amplitude. You can include it under the integrations object and it is supported for all API calls (identify, track, page, screen, and group).
A sample identify call with event_id is shown below:
When you send an event to Amplitude via RudderStack, Amplitude updates the existing user properties and appends any new ones. You can change this behavior by setting the skip_user_properties_sync property to true in the integrations object.
Can I send more than one group per user to Amplitude?
RudderStack does not support associating a user to more than one group per group API call sent to Amplitude.
To send more than one group per user, you need to call the group API multiple times with the relevant group information specified in the group settings.
How does RudderStack send the operating system information to Amplitude?
RudderStack sends the following contextual fields that capture the operating system details:
What are the batch processing limits in cloud mode?
When sending events in batches to Amplitude in cloud mode, there are two important limits to consider:
Maximum batch size: 20MB
Maximum number of events per batch: 500 events
If your events exceed these limits, RudderStack will automatically split them into multiple batches.
How does RudderStack handle user IDs with less than 5 characters?
When sending events with user IDs less than 5 characters in cloud mode:
For single event processing: RudderStack processes the event normally.
For batch processing: RudderStack removes the user ID from the event to prevent batch processing errors. However, the event is still sent with other identifiers (like device ID).
RudderStack recommends using user IDs that are at least 5 characters long to ensure consistent processing across all event types.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.