| [ Web Proxy ] |
| Viewing: https://www.docs.developers.amplitude.com/data/destinations/google-pub-sub/ | [Back] [Original] |
Products
For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.
Amplitude Data's Google Pub/Sub Cohort integration lets you stream your cohort membership updates straight to a Pub/Sub topic.
The payload sent to Pub/Sub is a JSON object. Example:
{
"cohort_name": "Test Cohort",
"cohort_id": "gs72ns",
"in_cohort": true,
"computed_time": "1685748245",
"message_id": "some-message-id:54",
"users": [{
"user_id": "user1@amplitude.com"
},
{
"user_id": "user2@amplitude.com"
}]
}
cohort_name: String. The name of the audience.cohort_id: String. The unique ID of the audience, which also appears in the URL when you view the audience in Amplitude.in_cohort: Boolean. Indicates whether this batch of users is entering or exiting an audience. Each message contains one state, not both.compute_time: String. The Epoch timestamp when Amplitude recomputes the audience. Kinesis streaming can't enforce order on incoming messages. Use this timestamp to restore order.message_id: String. The unique ID of each message.users: List. The users batch. Each user appears as a JSON object.user_id: String. The ID of the user.Before you get started, create a topic in Pub/Sub and a Google IAM service account.
Amplitude needs two things from Pub/Sub to set up the integration:
.json format based on the setup above.Amplitude creates the destination for cohort syncs.
Was this helpful?
On this page
Platform
Resources
Partners & Support
20122026 Amplitude, Inc.. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.
| Web Proxy Viewer | New URL | Original Page |