OxinionDeveloper
oxinion.events.track

Send location events to the Oxinion engine.

track() is the entry point for all location data. Call it whenever a user enters, exits, or dwells near a geofence — Oxinion evaluates the event and fires any matching hooks automatically.

Stable
Generally Available

Simple by design

track() is the entry point for all location data. Call it whenever a user enters, exits, or dwells near a geofence — Oxinion evaluates the event and fires any matching hooks automatically.

  • 01Three event types: enter, exit, and dwell
  • 02Attach a userId and optional metadata to every event
  • 03Oxinion matches the event against your geofences and fires hooks
Full API reference
TypeScript
1import { createOxinion } from 'oxinion';
2
3const oxinion = createOxinion({
4 apiKey: process.env.OXINION_API_KEY!, // oxk_live_...
5});
6
7// Track a user entering a location
8await oxinion.track({
9 type: 'enter',
10 lat: 43.6532,
11 lng: -79.3832,
12 userId: 'user_123',
13});
14
15// Track a dwell event (user stayed in area)
16await oxinion.track({
17 type: 'dwell',
18 lat: 43.6532,
19 lng: -79.3832,
20 userId: 'user_123',
21 metadata: { dwellSeconds: 120 },
22});
23
24// Track an exit
25await oxinion.track({
26 type: 'exit',
27 lat: 43.6532,
28 lng: -79.3832,
29 userId: 'user_123',
30});

One call. Infinite triggers.

track() is all you need to start firing location-based automation.