The Amplitude Accounts product extension makes a great deal of new analytical functionality available at the group level. A “group” is an object that a set of users might belong to - such as a Company of customers, Team of users, or a Playlist with listeners. If you are a B2B company, then this will help you understand how your Accounts interact with your product rather than just seeing the individual users in those companies.
What you will learn in this article
This article is an in-depth guide for the Accounts product extension. Use this article to learn how to set up group properties, understand how to look-up Accounts and Users, how to set up Account Level Reporting and how to set up this feature when using some of our integrations such as Segment or SalesForce.
Prerequisites
- This feature is only available to customers on Growth and Enterprise plans who have purchased the Accounts add-on
- Changes to account groups and group properties will be applied to new data moving forward
- Historical data cannot be retroactively updated to include account groups and group properties
- You are able to instrument up to 5 different group types per project
- Account Level Properties have a limit of 1000 account-level properties per project
Table of Contents
- Account-Level Reporting
- User & Account Look-Up
- Account-Level Properties (Group Properties)
- How to Set Up Account-Level Reporting
Account-Level Reporting
Amplitude allows you to instrument groups, which will allow you to do account-level reporting in the Amplitude platform. Account-level reporting performs a count by a distinct user property group, allowing you to process data by group instead of by the individual user. This is useful if your users can belong to distinct groups, such as each user belong to a certain organization if you are a B2B company using Amplitude. For example, if you group your users under an account ID, then you can use the right module in the chart control panel to analyze how many distinct accounts were active or performed a certain event:
This would allow you to perform analysis on not only your individual users but also the different groups your users are a part of. You can use account-level reporting in most Amplitude chart types as well as create group-level cohorts.
Charts
All chart and report types in Amplitude support account-level reporting with the exception of the Personas and Compass reports. To use the group you have instrumented in your chart, select the group you want to analyze your data by in the "Users" dropdown in the right module of the chart control panel. For example, if you wanted to track the number of daily active organizations and group them by region, you can set up an Event Segmentation chart like this:
Another example of performing account-level reporting could be to create a User Composition chart but this time focusing on the composition of a user property for groups. For example, the following chart would show you the composition by country of all the organizations that use your product:
Behavioral Cohorts
To create a group-level Behavioral Cohort after you have instrumented account-level reporting in Amplitude, use the dropdown on the left to designate if you want to create a cohort out of one of your groups.
For example, we can create a Behavioral Cohort of companies who fired the event 'Create customized report' and apply that group-level cohort to a Retention Analysis chart to see the retention of companies who fired that event versus companies that did not.
The following chart shows us that organizations that leverage the Slack integration have higher retention than organizations that do not, which suggests that this might be important to focus on for organization retention.
Microscope: View & Download Groups
You can also use our Microscope feature's various functionalities with account-level reporting. This is useful if you are performing an account-level analysis and want to dig deeper into a single data point or bucket.
For example, let's say you have an instant messaging application and you are trying to increase the number of new user invites. You create a Funnel Analysis with steps from 'Activate Account' to 'Invite New Contact':
You can then use Microscope to view the groups that are in the last step's drop-off or download the groups to understand why those groups drop off before inviting additional co-workers. You can also create a group-level cohort of those accounts, apply that cohort to other charts, or open Investigate Conversion Drivers to perform a detailed analysis.
User & Account Look-Up
Accounts allow you to drill into a single group’s behavior, similar to the User Activity section.
To access the Accounts tab:
- Select 'User & Account Look-Up' in left-hand navigation.
- Select 'Account'.
- Then select one or all of the Groups you have instrumented.
- (optional) Search for a specific Group or Group property
You can select the project you’d like to view, toggle on the “Live event updates” in the top right corner of the page, add additional columns to the view or use the search box to search for a specific group by name, Group ID or Group Property.
Search by Group Property
- Group property searches must follow the syntax: name = value.
- Restricted to groups who have been active in the last 6 months.
- Amplitude will search across ALL historical values held by the property and not just most recent group property value.
- Quotes are required for multi-word strings. This applies to both the Group Property name and the value.
- You can combine clauses to narrow down the search. Delimiters like commas, semi-colons should not be specified. Spaces are optional.
When an account is selected in the “Real-Time Activity” feed, you will be taken to that account’s page where you can view the account’s properties and activities. You will find the account’s most recent properties in the top panel. The account’s properties can be set in 3 different ways - the Group Identify API, the Salesforce integration, and by using Event Segmentation to create dynamic properties. These properties can be utilized to describe the account as whole (e.g. '30 day active users', 'account manager', 'plan type', 'renewal date', etc.).
The charts below are automatically generated and depict the account’s activity so you can see how many users in that account were active this week, how well they are retained, and more.
Account-Level Properties (Group Properties)
Important Note:
- The limit per project is 1000 account-level properties.
Amplitude now allows accounts to have group properties, which are properties at the account level. These properties will apply to all users that fall into that account. For example, let's say you work at company, SaaS 123, and you are using Amplitude to analyze at your accounts' health. Johnny is your customer and is an employee at Company ABC. Your Company, SaaS 123, has Jane as the account manager for Company ABC. If 'account manager' is set as a group property, then Johnny will have the group property 'account manager' = 'Jane' because he is a part of Company ABC.
You can see all the group properties that have been created for a certain project under the Advanced tab under Group Properties and you can mark unneeded ones as "Hidden".
Dynamic Group Properties
You can now turn your KPIs into dynamically updating group properties for Accounts. Using this feature, you can add group properties such as “Last 7 Day Active Users” or “Monthly Active Users” to each account in your product. Dynamic group properties are created by admin-level users via an Event Segmentation chart with the following steps:
- Save a single time series Event Segmentation chart: Save a user-level chart with a single time series metric that you want to track.
- Note: Dynamic Properties cannot be supported on frequency and property distribution metrics. Because some metrics cannot be supported, dynamic properties are also not supported on custom formula. Please submit a feature request to support.amplitude.com if you would like custom formulas excluding frequency and property distribution to be supported.
- Determine time interval: Set the time interval you would like to update the group property on. For example, a rolling window of “last 7 day active users” will update every day while “weekly active users” will update once every calendar week.
- Note: Dynamic Properties are not supported on static time ranges.
- Name group property: Choose your group type and name for the group property.
For example, to keep track of daily active users in your accounts, you can use the dynamic group properties feature to instrument a group property directly from the UI and not have to write any additional code. The following chart tracks daily active users and then using the dynamic group property feature, you can create a group property that tracks the daily active users within each account.
Note: If the chart used to create the Dynamic Group Property is edited, it won’t affect the Dynamic Group Property. We copy the entire definition at the time of the creation and use it for the subsequent syncing
Salesforce Integration
It is also possible to create group properties using our Salesforce integration. You can use the integration to set specific Salesforce fields as group properties in Amplitude. To learn more on how to create groups in Amplitude, please have a look at the following docs:
- Javascript SDK - Setting User Groups
- iOS SDK - Setting User Groups
- Android SDK - Setting User Groups
- Segment - Group API
In order to match the group object in Amplitude with the data in the Salesforce, refer to the following steps:
- Grant access: Grant Amplitude access to your Salesforce data. Navigate to Sources and Destinations. Click "Add Data Source" and select Salesforce.
Once authorization is successful, you can see three tabs within the Salesforce Integrations page: General, Synced Group Properties, and Synced Salesforce Objects. - Set up account-level reporting: Verify that you already have account-level reporting set up in Amplitude.
- Match the group type: In the Synced Salesforce Objects tab, use the group matching functionality to map the Salesforce field to an existing Amplitude group type. We will use the values of the field that you chose to match the field to the corresponding groups in Amplitude. For example, let's say you have a field called "Account Sub-Type" for all accounts in Salesforce. You can use that field to map data to the Amplitude group type "Group Sub-Type".
- Note: If we detect an account in Salesforce with a unique mapped field value that does not exist in Amplitude, then we will create it for you in Amplitude. However, since this new account will not have any product usage data against it as Amplitude has never seen the account before, it might not be useful to you.
- Note: If we detect an account in Salesforce with a unique mapped field value that does not exist in Amplitude, then we will create it for you in Amplitude. However, since this new account will not have any product usage data against it as Amplitude has never seen the account before, it might not be useful to you.
- Match group properties: In the Synced Group Properties tab, use the group property matching functionality to map the Salesforce fields to the Amplitude group property. We will periodically fetch those fields and append them to the corresponding groups as group properties. For example, the following setup would create group properties 'Active Status' and 'Account Score' for all the accounts that are being tracked, with the values pulled from Salesforce.
How does the integration work?
We have a daily job (run every morning UTC time) that will update all group properties whose pickup dates are the current date. When the Salesforce integration is activated, the first synchronization task will be executed the very next day in the morning (UTC).
Regarding synchronization with Salesforce, we will have a task entry in the database for each group type which has a Salesforce matching setup. No matter how many group properties we have had matched for this group, we will only have a single task for it. For different group types from the same customer, we will have different tasks accordingly.
Interval
You are able to update the interval to the number of days you’d like, such as: daily, weekly, monthly or a specific number of days. For example, if the last update was performed on September 1, 2017 and the interval is 7 days, then the next pickup date will be September 8, 2017.
- Important Note: An event does not need to occur after the property update since the group property (Salesforce property) is not identified by the event. To add other custom (non-SFDC) group properties to your groups, you will need to call the Group Identify API.
Group Identify API
Using the Group Identify API you can create a new group tied with all expected group properties or update group properties for an existing group. In the example requests, the parameters and keys are highlighted purple. The values in red are what you need to replace with the parameters you are specifically interested in.
In addition, group property operations ($set, $setOnce, $add, $append, $unset) are supported in this Group Identify API.
Request Format
Send a POST or GET request to https://api.amplitude.com/groupidentify
with two request parameters:
Parameter | Description |
---|---|
api_key (required) |
API Key from your project's Settings page. "040062a5d38552315b98302ba4f2f" |
identification (required) | A single JSON identification object (see below for fields). |
Example Request (single)
curl --data 'api_key=040062a5d38552315b98302ba4f2f' --data 'identification={"group_properties":{"org csm":"Lucas","org plan":"Enterprise","org owner":"Luis"},"group_value":"1234","group_type":"org id"}' https://api.amplitude.com/groupidentify
Example Request (batch)
curl --data 'api_key=040062a5d38552315b98302ba4f2f' --data 'identification=[{"group_properties":{"org csm":"Lucas","org plan":"Enterprise","org owner":"Luis"},"group_value":"success","group_type":"org id"},{"group_properties":{"org csm":"Sarah","org plan":"Growth","org owner":"Sandy"},"group_value":"1234","group_type":"org id"}]' https://api.amplitude.com/groupidentify
Note: The upload limits here are applicable to these requests.
Keys for the identification
Parameter
The following keys can be sent within the JSON identification object. Note that both group_type and group_value are required.
Key | Description |
---|---|
group_type (required) string |
One type of group (e.g. account or company). "org name", "org id" |
group_value (required) string |
One specific value of the above group type. "group_type":"org id","group_value":"12345678" or "group_type":"account name","group_value":"Acme Corp" |
group_properties (optional) dictionary |
A dictionary of key-value pairs that represent additional data tied to the group. Each distinct value will show up as a group segment on the Amplitude dashboard. Note: You can store property values in an array, and date values are transformed into string values. In addition, group property operations ($set, $setOnce, $add, $append, $unset) are supported in this Group Identify API. {"arr": "10000", "cs": ["Justin", "Ben"], "renewal_date": “01/01/2018" } |
How to Set Up Account-Level Reporting
Important Note:
- Amplitude has a limit of 5 group types per project.
To use account-level reporting, you will have to set up this feature in your instrumentation. See the sections below for how to set it up depending on how you are sending data to Amplitude. Once you have instrumented groups, you will see another dropdown appear in the right module of the chart control panel for certain charts. You will then be able to perform account-level reporting and designate whether you want to see events performed by users or groups.
SDKs
You can set up account-level reporting in our SDKs by following these specific instructions depending on which SDK you are using:
Identify API
If you are sending data to us server-side, you will have to use the groups
key in your identification object. This will associate a particular user in a certain group. Please see the Identify API documentation for more information on how to instrument groups via our Identify API.
HTTP API
If you are sending data to us server-side, you will have to use the groups
key in your event object. This will add event-level groups (groups that only persist on that specific event). Please see the HTTP API documentation for more information on how to instrument groups via our HTTP API.
Segment
Note: The Segment <> Amplitude cloud (any of Segment's server-side sources or the unbundled client-side integration) and device mode integration (bundled Segment-Amplitude integration) now support setting both group types and group properties through Segment's group
call. See details from Segment HERE.
To set group types in Amplitude via Segment, you must enable the following Amplitude destination settings and provide them with the appropriate values:
- Group Type Trait: This specifies what trait in your Segment
group
calls will contain the desired group type. - Group Value Trait: This specifies what trait in your Segment
group
calls will contain the desired group value.
For example, if you have the following code:
analytics.group("placeholder", {
groupType: "org name", // Segment trait "groupType" groupValue: "Amplitude", // Segment trait "groupValue" employees: "120" // group property });
Important Note:
- What you pass in as the groupId (in the above code, "placeholder") in the group call will not matter as this value is not mapped to anything on Amplitude's side.
And this in Segment's Amplitude destination settings:
Then the integration will create 'org name' as a group type in Amplitude and associate the current user with 'org name' = 'Amplitude'.
To set group properties via instrumentation code, you will need at least one source in Segment that is using the Segment <> Amplitude cloud mode integration (any of Segment's server libraries as well as the unbundled client-side integration). Data in Amplitude where the user property '[Amplitude] Library' = 'segment' means it is being sent via a cloud mode integration. You can use this user property verify what type of integration you have installed in Amplitude for each of your Segment sources. Alternatively, you can also call the Amplitude SDK's functions to set group properties:
analytics.ready(function() { var groupIdentify = new amplitude.Identify().set('employees', 100); amplitude.getInstance().groupIdentify('orgId', '1234', groupIdentify);
});
Any additional traits that are passed into the group
call will appear in Amplitude as group properties. For example, from the above code, 'employees' will be set as an group property in Amplitude: