Usage Metering
Ingestion Options
Segment.io
10min
you can ingest events using segment io https //segment com/catalog/integrations/amberflo/ https //segment com/catalog/integrations/amberflo/ segment's amberflo destination provides the ability to ingest meters (track, page, screen) and create customers (identify) in amberflo quick links onboarding walkthrough docid\ n7 owhejvrapwtrzb7mkb meter types https //docs amberflo io/docs/meter types customers https //docs amberflo io/docs/customers 1amberflo sdks docid\ uoknrqmjmxmyhgcmkjsom getting started docid\ kdkc4ffc0 k 1anjm362f getting started from the search for choose which go to the enter the “api key” in the supported methods page create a meter called page in amberflo see onboarding walkthrough docid\ n7 owhejvrapwtrzb7mkb the page is ingested as meter with value 1 analytics page({ userid "some user id", name "home", properties { "title" "welcome | initech", "keywords" "paper,comedy", "search" "schrute farms", "referrer" "https //google com", "path" "/home", "browser" "chrome", "url" "https //segment com" } }) mappings amberflo webhook endpoint curl request post \\ \ url https //app amberflo io/ingest \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x api key your api key' \\ \ data ' { "uniqueid" "messageid", "customerid" "some user id", "meterapiname" "page", "metervalue" 1 0, "metertimeinmillis" 1619445706909, "dimensions" { "name" "home", "title" "welcome initech", "keywords" "paper,comedy", "search" "schrute farms", "referrer" "https google com", "path" " home", "browser" "chrome", "url" "https segment com" } } screen create a meter called screen in amberflo see onboarding walkthrough docid\ n7 owhejvrapwtrzb7mkb the screen event is ingested as meter with value 1 analytics screen({ userid "some user id", name "home", properties { "title" "welcome | initech" } }) mappings amberflo webhook endpoint curl request post \\ \ url https //app amberflo io/ingest \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x api key your api key' \\ \ data ' { "uniqueid" "messageid", "customerid" "segmentuserid", "meterapiname" "screen", "metervalue" 1 0, "metertimeinmillis" 1619445706909, "dimensions" { "name" "home", "title" "welcome initech" } } ' identify identify creates a customer in amberflo or updates if customer already exists see onboarding walkthrough docid\ n7 owhejvrapwtrzb7mkb segment's userid is required for a customer in amberflo if userid is not set, then the customer will not be created in amberflo and the identify event will be discarded analytics identify({ userid "some user id", traits { "name" "john doe", "email" "john doe\@email com", "plan" "premium", "logins" 5, "phone" "650 769 3240", "username" "marakasina", "website" "example com", "avatar" "https //s3 amazonaws com/uifaces/faces/twitter/scottkclark/128 jpg" } }) mappings amberflo webhook endpoint curl request put \\ \ url https //app amberflo io/customers \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x api key your api key' \\ \ data ' { "customerid" "xxxx zzzzz", "customername" "mycustomername", "customeremail" "john doe\@email com", "traits" { "plan" "premium", "logins" 5, "phone" "650 769 3240", "username" "marakasina", "website" "example com", "avatar" "https s3 amazonaws com uifaces faces twitter scottkclark 128 jpg" } } ' track create a meter in amberflo for the track event in segment see onboarding walkthrough docid\ n7 owhejvrapwtrzb7mkb the segment track event is ingested as a meter with value of properties value, or 1 if the value is not set analytics track({ userid "some user id", event "apicalls", properties { "value" 2 0 "region" "us west 2" } }) mappings amberflo webhook endpoint curl request post \\ \ url https //app amberflo io/ingest \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'x api key your api key' \\ \ data ' { "uniqueid" "messageid", "customerid" "some user id", "meterapiname" "apicalls", "metervalue" 2 0, "metertimeinmillis" 1619445706909, "dimensions" { "region" "us west 2" } } ' links segment catalog > amberflo https //app segment com/amberflo lior/destinations/catalog/amberflo segment destination documentation > amberflo https //segment com/docs/connections/destinations/catalog/amberflo/