Amplitude
Sync Cohorts with Amplitude
1. Generate a Private API Key
- Log in to your Nudge Dashboard.
- Navigate to Settings > Secret keys in the sidebar.
- Click on Create new secret key.
Important
Save your API key securely. You won't be able to view it again after closing this dialog.
2. Add a New Webhook in Amplitude
- In Amplitude Data, go to
Catalog > Destinations
. - Click webhook in the cohorts section
2.1 Configure the Webhook for Nudge
When setting up the webhook in Amplitude, use the following configuration:
- Name:
Nudge
- Request Type:
POST
- Request URL:
https://main-api.nudgenow.com/api/integration/cohorts/amplitude
Header Parameters
Enable Header Parameters and add the following:
apikey
: Your private API key (required for authorization)
2.2 Define the payload schema
Use the default Apache freemaker schema in Amplitude. A payload should look like this :-
{
"cohort_name": "sample cohort", // the name for each cohort must be unique
"cohort_id": "qwertypoiuyt",
"in_cohort": true,
"message_id": "4415e348-2537-46cb-8bf2-b27523ad724a::enter::0",
"users": [
{
"user_id": "usr_1" // your user id
},
{
"user_id": "usr_2"
},
{
"user_id": "usr_3"
}
]
}
Note
- Use cohort sync with updates per cohort instead of per user.
- Ensure each cohort has a unique name, as visible in the nudge cohorts table. Nudge groups the cohorts on name only.
3. See Cohorts in Nudge
Navigate to the Users section in the sidebar of your Nudge dashboard.
You will see the newly created Cohort imported from Amplitude.
Success!
Your integration is now complete. You can start using your Amplitude cohorts in Nudge.
Need help? Contact [email protected]