Segment
Already sending events to Segment? Hey Glancy speaks the same language: it accepts Segment messages as they are, so you can forward your existing sources without changing any tracking code. There are two ways.
Option 1: a Webhooks destination
Segment forwards every event from your sources to Hey Glancy. Your Hey Glancy must be reachable from the internet, since Segment sends from its own cloud.
In Segment, go to Connections → Destinations → Add destination and choose Webhooks (Actions).
Connect the sources you want in Hey Glancy.
Add a mapping for all event types, with method
POST, the payload set to the whole event ($.), and this URL:https://ingest.heyglancy.com/api/ingestAdd this header, with your bucket's write key (from its Setup page):
Authorization: Bearer YOUR_WRITE_KEYTurn the destination on. Events show up in Real time within seconds.
Use one destination per bucket: production sources to the production bucket's key, staging to staging.
Option 2: point a Segment library at Hey Glancy
Hey Glancy also answers Segment's HTTP Tracking API (/v1/batch, /v1/track, /v1/identify…), so any Segment
library can send straight to Hey Glancy. Set its host to your Hey Glancy and its write key to your bucket's:
import { Analytics } from "@segment/analytics-node";
const analytics = new Analytics({ writeKey: "YOUR_WRITE_KEY", host: "https://ingest.heyglancy.com" });
analytics.track({ userId: "user_42", event: "Order Completed", properties: { revenue: 42 } });
The same works with Segment's libraries for Python, Ruby, Go, Java and others that let you set the API host.
How Segment messages map
| Segment | In Hey Glancy |
|---|---|
track |
An event named after event |
page |
Page Viewed |
screen |
Screen Viewed |
identify |
Traits saved on the person's profile; their anonymous history is merged into the user id |
group |
The person tied to a group, stored as a $group system event |
alias |
previousId merged into userId |
Duplicates are dropped by messageId, so replaying a batch is safe. Events take their time from timestamp, then
originalTimestamp, then when they were received. See the HTTP API for every field and limit.