Ingesting events using Segment
If you have a Segment.com instance, the easiest way to ingest events into Metronome is to send events from Segment.
Getting Started
- From your Segment UI's Destinations page click on "Add Destination".
- Search for "Metronome" within the Destinations Catalog and confirm the Source you'd like to connect to.
- Enter your "API Key" into the Segment Connection Settings UI.
- Enter your desired transformation mapping into the
Field Mapping
in the Segment Connection Settings UI, please refer to the documentation below for more details.
Field Mapping
In order to map your Segment events to the Metronome event format the Metronome destination allows you to specify a field mapping. The key
in the mapping is the required Metronome field and the corresponding value
is the field in the Segment Event.
All mappings are required
It is required to specify a mapping even if the property name does not differ between the Segment event and the Metronome payload.
If your Track call looks like this:
analytics.track('billing event', {
t: 'user_action',
cid: '533c3db43f22',
ts: '2020-04-01 19:10:25-07',
data: {
additionalKey: true,
}
});
then your Field Mapping
should look like this:
Transaction ID
Metronome events require the transaction_id
field to ensure all events are processed exactly once. If you do not provide a transaction_id
mapping, Metronome will use the Segment messageId
field, which is a unique ID for every Segment event. This is probably ideal for most users, but if you want to manually control the Metronome transaction_id
you can provide a mapping to any field in the Segment event."