> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/activate/event-streaming/destinations/analytics/amplitude/amplitude-server.md).

# Amplitude server

This destination sends events from Chord's servers directly to Amplitude, using Amplitude's HTTP API v2. See [Amplitude](/activate/event-streaming/destinations/analytics/amplitude.md) for how it fits with the [Amplitude browser](/activate/event-streaming/destinations/analytics/amplitude/amplitude-browser.md) version, and for the default event routing and custom action mappings.

## Settings

* **Destination Name** (required): a name to tell this destination apart.
* **Project API Key** (required): your Amplitude Project API Key. Find it in Amplitude under **Data > Sources & Destinations**.
* **Project Secret Key** (optional): required only for group identify and user mapping. See [Requirements](#requirements). Find it in **Data > Sources & Destinations**.
* **Region** (optional): where Chord sends your data. Choose **North America** (default) or **Europe**. Choose Europe if your Amplitude project is in the EU data center.
* **Property Splitting** (optional): when off (the default), an Order Completed event with a products array generates an individual Product Purchased event for each product. When on, only the Order Completed event is sent. Turn it on if property splitting is active in your Amplitude project, because Amplitude then splits the products array itself. Confirm that property splitting is enabled for the products array in Amplitude before you turn this on.
* **Custom Action Mappings** (optional): override the default routing for specific events. See [Custom action mappings](/activate/event-streaming/destinations/analytics/amplitude.md#custom-action-mappings).
* **Consent Requirements** (optional): the consent categories a visitor must accept before Chord sends data to this destination. See [Consent](/activate/event-streaming/consent.md).

## Connect

Add **Amplitude (Cloud Mode)** from the destination catalog, using the settings above. See [Connect a destination](/activate/event-streaming/connect-a-destination.md) for the full steps.

## Requirements

| Feature                   | Requires                                                         |
| ------------------------- | ---------------------------------------------------------------- |
| Basic event tracking      | Project API Key                                                  |
| User identification       | Project API Key                                                  |
| Group analytics           | Project API Key + Project Secret Key + Amplitude Accounts add-on |
| User aliasing (`mapUser`) | Project API Key + Project Secret Key                             |

## Event mapping

This version uses the [default event routing](/activate/event-streaming/destinations/analytics/amplitude.md#default-event-routing) and [custom action mappings](/activate/event-streaming/destinations/analytics/amplitude.md#custom-action-mappings) on the Amplitude page.

| Chord event     | Amplitude event     | Notes                                                                                                                                                          |
| --------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| track           | `logEventV2`        | Event name sent as `event_type`                                                                                                                                |
| Order Completed | `logPurchase`       | See [Revenue fields](#revenue-fields)                                                                                                                          |
| page            | `logEventV2`        | Sent as "Viewed \[name]", or "Viewed Page" without a name                                                                                                      |
| screen          | `logEventV2`        | Sent as "Viewed \[name]", or "Viewed Screen" without a name                                                                                                    |
| identify        | `identifyUser`      | Sent to Amplitude's identify API with the user properties below                                                                                                |
| group           | `groupIdentifyUser` | Group type is the event's `groupType`, or `company`. Group value is `groupId`. Traits become the group properties. Needs the Project Secret Key and a group ID |
| alias           | `mapUser`           | `previousId` becomes `user_id`, and `userId` becomes `global_user_id`. Needs the Project Secret Key and both IDs                                               |

## Default field mappings

These tables show how Chord event fields are automatically mapped to Amplitude fields.

**User and device identification**

| Source field                                                                                                 | Amplitude field | Notes                   |
| ------------------------------------------------------------------------------------------------------------ | --------------- | ----------------------- |
| userId                                                                                                       | `user_id`       | Primary user identifier |
| `properties.amplitude_device_id` > `context.clientIds.amplitudeDeviceId` > `context.device.id` > anonymousId | `device_id`     | In priority order       |
| messageId                                                                                                    | `insert_id`     | Deduplication key       |

**Device and platform**

| Source field                | Amplitude field       | Fallback                                        |
| --------------------------- | --------------------- | ----------------------------------------------- |
| context.device.type         | `platform`            | user.deviceType, or "Web" for analytics.js      |
| context.os.name             | `os_name`             | user.deviceOs, parsed from User-Agent           |
| context.os.version          | `os_version`          | user.deviceOsVersion, parsed from User-Agent    |
| context.device.brand        | `device_brand`        | —                                               |
| context.device.manufacturer | `device_manufacturer` | user.deviceManufacturer, parsed from User-Agent |
| context.device.model        | `device_model`        | user.deviceModel, parsed from User-Agent        |
| context.network.carrier     | `carrier`             | user.deviceCarrier                              |
| context.userAgent           | `user_agent`          | —                                               |
| context.app.version         | `app_version`         | —                                               |

**Location and locale**

| Source field               | Amplitude field | Fallback             |
| -------------------------- | --------------- | -------------------- |
| context.location.country   | `country`       | user.address.country |
| context.location.region    | `region`        | user.address.state   |
| context.location.city      | `city`          | user.address.city    |
| context.location.dma       | `dma`           | —                    |
| context.location.latitude  | `location_lat`  | user.deviceLatitude  |
| context.location.longitude | `location_lng`  | user.deviceLongitude |
| context.locale             | `language`      | user.locale          |
| context.ip                 | `ip`            | user.ip              |

**Event data**

| Source field                                                               | Amplitude field    | Notes                                                                 |
| -------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------- |
| event                                                                      | `event_type`       | For page and screen events: "Viewed \[name]"                          |
| timestamp                                                                  | `time`             | Converted to milliseconds. Defaults to the time Chord sends the event |
| properties                                                                 | `event_properties` | All event properties                                                  |
| `properties.amplitude_session_id` > `context.clientIds.amplitudeSessionId` | `session_id`       | For session tracking                                                  |
| context.library.name                                                       | `library`          | Defaults to "chordcdp"                                                |
| `groups` > `context.groups`                                                | `groups`           | For group analytics                                                   |

**Mobile advertising IDs**

| Source field                                           | Amplitude field | Notes                  |
| ------------------------------------------------------ | --------------- | ---------------------- |
| `context.device.advertisingId` > `context.device.idfa` | `idfa`          | iOS Advertising ID     |
| `context.device.advertisingId` > `context.device.adid` | `adid`          | Android Advertising ID |
| context.device.id                                      | `idfv`          | iOS Vendor ID          |

**Revenue fields**

Chord copies these from the event's properties on every event. The `logPurchase` action then fills in the gaps.

| Source field             | Amplitude field   | Notes                                                                                                                                                           |
| ------------------------ | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| properties.revenue       | `revenue`         | With `logPurchase`, if there is no revenue, Chord uses `quantity` times `price` when both are numbers                                                           |
| properties.price         | `price`           | Unit price                                                                                                                                                      |
| properties.quantity      | `quantity`        | Number of items. With `logPurchase`, rounded to a whole number                                                                                                  |
| `properties.productId`   | `productId`       | With `logPurchase`, falls back to `properties.product_id`                                                                                                       |
| properties.revenueType   | `revenueType`     | With `logPurchase`, defaults to "Purchase"                                                                                                                      |
| properties.products\[\*] | Individual events | Creates a "Product Purchased" event per product, unless **Property Splitting** is on. Each one copies the order event, with the product as its event properties |

With `logPurchase`, the revenue fields are filled in only when the event has a revenue or a `quantity` and `price` to calculate one.

**UTM and campaign tracking**

Campaign parameters are mapped to user properties with both current and initial values:

| Source field             | `$set` property | `$setOnce` property    |
| ------------------------ | --------------- | ---------------------- |
| context.campaign.source  | `utm_source`    | `initial_utm_source`   |
| context.campaign.medium  | `utm_medium`    | `initial_utm_medium`   |
| context.campaign.name    | `utm_campaign`  | `initial_utm_campaign` |
| context.campaign.term    | `utm_term`      | `initial_utm_term`     |
| context.campaign.content | `utm_content`   | `initial_utm_content`  |
| context.page.referrer    | `referrer`      | `initial_referrer`     |

User traits from identify calls are also set through `user_properties.$set`.

## Custom events

Every track event is sent to Amplitude under its own name, with all its properties as event properties. Use [custom action mappings](/activate/event-streaming/destinations/analytics/amplitude.md#custom-action-mappings) to rename events, route them to a different Amplitude action or drop them.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/activate/event-streaming/destinations/analytics/amplitude/amplitude-server.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
