> ## Documentation Index
> Fetch the complete documentation index at: https://kb.aampe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Segment

> Estimated setup time: 15 minutes

There are 3 ways to set up Aampe as a segment destination:

* Configure Aampe (Actions) Destination - Preferred
* Configure Aampe Destination
* Google Cloud Storage Destination

## Configure Aampe (Actions) Destination - Preferred

The newer actions based destination allows you to send track, page, screen and identify events. It also allows you to use region of choice for data residency.

1. Login to your Segment account at [https://app.segment.com/](https://app.segment.com/)
2. Select **Destinations** under Connections on the left side panel
3. Click on **Add Destination**
4. Enter **Aampe (Actions)** in the Filter Destinations searchbox.
5. On the Settings page you will see various options:
   * Give the name of the destination: "Aampe-Actions"
   * Your API Key:

     <Info>
       Note that you will need the Aampe API key that you can fetch from:

       1. Go to [https://compose.aampe.com/system-setup/integrations/events](https://compose.aampe.com/system-setup/integrations/events)
       2. Login using your org credentials
       3. Select **Connect** next to Aampe endpoint
       4. Copy the API key
     </Info>
6. Paste in the Aampe api key
7. Select your **data residency** (your preferred data region)
8. Change the mappings as needed depending on your data (Optional)

You should be all set sending data to Aampe.

## Configure Aampe Destination

1. Login to your Segment account at [https://app.segment.com/](https://app.segment.com/)
2. Select **Destinations** under Connections on the left side panel
3. Click on **Add Destination**
4. Enter **Aampe** in the Filter Destinations searchbox.
5. Click on the **Configure Aampe** button, select the data source for your app events, then click on **Next**.
6. Enter a destination name of your choice and click on **Save**. We recommend naming it "Aampe App Events"
7. Login to [Aampe Composer](https://compose.aampe.com/configure/integrations) in another browser tab, then go to **System Settings > Integrations**
8. Select **Segment**, and then copy the Segment API key from here.
9. Paste this key into the **API Key** field under Connection Settings on the Segment website (this is where we left off at Step 6.)

## Configure Google Cloud Storage Destination

**Requirements:**

* A Google Cloud bucket name. For example: `aampe-staging-data-xxx`
* A credentials file. For example: `xxxxxxxx-4e120-14a6f2ac3c25.json`

Aampe will provide both of these to you for setup.

1. Go to Segment's **Connection > Destinations** section
2. Click on **Add Destination**
3. Search for **Google Cloud Storage** in the catalog that appears
4. Click on the **Google Cloud Storage** destination
5. Click on **Configure Google Cloud Storage**.
6. Select the source you wish to share with Aampe and then click on **Confirm Source**. Source will be your data source housing the event data
7. You will then be redirected to a screen where you will provide the destination bucket details (provided by Aampe):
   * **Bucket:** the name of the bucket where the data will flow
   * **GCS Private Key File:** the content of the JSON with the access credentials to that bucket
8. After having input both details, you need to click on the toggle that enables this destination and the integration is completed

***
