
Amplitude Data's Google Pub/Sub integration lets you stream your Amplitude event data straight to Pub/Sub.

## Considerations

- Amplitude sends the `user_id`, `event_name`, and `created_at` along with all user, group, and event properties to Pub/Sub.
- The data Amplitude posts in Pub/Sub is the same JSON as documented in the [Amplitude Export API](/docs/apis/analytics/export#response).
- This destination supports Identify Forwarding. Anytime you make an Identify call to Amplitude, Amplitude forwards that user information. Refer to the [Identify documentation](/docs/apis/analytics/identify) for more information.
- Enter the Google Cloud Service Account as a base64 encoded string.

## Set up the integration

### Prerequisites

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:

- **Pub/Sub topic name**: The name of the topic, not the full name in Google Cloud. Refer to the [Google Pub/Sub](https://cloud.google.com/pubsub/docs/admin) documentation for help with this step.
- **Google service account key**: Create a dedicated service account for the Amplitude Pub/Sub integration. Refer to the [Google documentation](https://cloud.google.com/iam/docs/service-accounts) for help with this step.

### Google Pub/Sub setup

After you create your topic and service role, add the service account as a principal for the topic you created. For more detailed instructions, refer to the [Google documentation](https://cloud.google.com/pubsub/docs/access-control?hl=en#console).

1. Open the topic.
2. In the *Permissions* tab, click **Add Principal**.
3. Add the service account's name.
4. Select **Pub/Sub Publisher** as the role.

Next, create a key for the service account. You need this to complete Amplitude setup. Refer to the [Google documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) for help with this step.

### Amplitude setup

1. In Amplitude Data, click **Catalog** and select the **Destinations** tab.
2. In the Event Streaming section, click **Google Pub/Sub**.
3. Enter a sync name, then click **Create Sync**.
4. Click **Edit**, then paste your Pub/Sub topic name and Google Cloud service account key.
5. Use the **Send events** filter to select the events to send. Amplitude recommends sending only the most important events.
6. When finished, enable the destination and save.
