For the complete documentation index, see llms.txt. This page is also available as Markdown.

Amplitude

Amplitude is a product analytics platform. Chord sends events to Amplitude from the browser and from the server. The two versions share the same default event routing and custom action mappings.

What each version does

  • Amplitude browser loads the Amplitude SDK in the shopper's browser. It enables session tracking and real-time event capture. In the destination catalog in Chord, you add it as Amplitude (Device Mode).

  • Amplitude server uses Amplitude's HTTP API v2. Events are sent from Chord's servers directly to Amplitude. In the destination catalog in Chord, you add it as Amplitude (Cloud Mode).

Why use both

The browser version catches on-page behavior and passes the shopper's session along to the server version. The server version survives ad blockers and closed tabs.

Turn on the browser version even if you only send events from the server version. It is needed for accurate session tracking. With it on, each Chord event carries context.clientIds.amplitudeSessionId, which holds the shopper's current session ID.

Default event routing

Both versions use the same default routing. The version pages say how each one carries it out.

Chord event
Amplitude event
Notes

track

logEventV2

All track events except Order Completed

logPurchase

Includes revenue tracking

identify

identifyUser

Updates user properties

page / screen

logEventV2

The server version sends "Viewed [name]". The browser version names page events by its page settings

group

groupIdentifyUser

The server version needs the Project Secret Key and the Amplitude Accounts add-on

alias

mapUser

Server version only. Needs the Project Secret Key. The browser version ignores alias events

Field mappings differ by version. See Amplitude browser and Amplitude server.

Amplitude actions reference

Action
Description

logEventV2

Track a standard event with properties

identifyUser

Update user properties without tracking an event

logPurchase

Track a revenue event (includes revenue, price, quantity, productId)

mapUser

Merge two user identities (alias). Server version only. Requires Project Secret Key

groupIdentifyUser

Update group properties. The server version requires the Project Secret Key

logEvent

Legacy name. Chord handles it the same way as logEventV2

Custom action mappings

Override the default routing or add field transformations using Custom Action Mappings. The setting works the same way on both versions.

Use cases

  • Route specific events: send Subscription Started to logPurchase instead of logEventV2.

  • Rename events: transform Button Clicked into CTA Interaction.

  • Map custom fields: map any property to an Amplitude field. Use dot notation in the source path.

  • Filter events: use $drop as the target event name to exclude events.

Mapping fields

Field
Description

Source Event(s)

Event(s) to match. Comma-separated for multiple (for example Purchase,Subscription). Use * for all.

Amplitude Action

Which Amplitude API to call

Target Event Name

Override the event name. Leave empty for the original. Use $drop to filter it out.

Field Mappings

Map source properties to Amplitude fields

Property path examples

Target property

The Target Property names the field Chord sets. What it sets depends on the version.

  • Browser version: an event property added to the event, or a user property on an identify event. For example, order_id adds an order_id property. On an Order Completed event, revenue, productId, quantity and revenueType also feed the revenue call.

  • Server version: a top-level field on the Amplitude event, such as revenue, productId, price, quantity or revenueType.

A name with dots, such as event_properties.item_id, is used as one name. It is not a path into nested fields.

Which entry applies

  1. The first entry in your list that matches the event decides the Amplitude action.

  2. Among the entries with that action, Chord then picks the field mappings and Target Event Name like this:

    1. Exact match: the event name matches exactly (for example Order Completed).

    2. Type match: the event type matches (for example track matches all track events).

    3. Wildcard: * matches all events (lowest priority).

Examples

Route subscription events to revenue tracking

Rename an event

Map the order total to revenue

Add a custom property (browser version)

Drop unwanted events

Set up

Last updated

Was this helpful?