Skip to main content

Segment Integration

If you already track events with Segment, you can forward that same stream to Moveo One without changing any of your existing track, page, screen, identify, or group calls.

Moveo One ships an open-source device-mode Segment destination for each major platform. You add it as a plugin to your Segment SDK; from then on every Segment event is mirrored to Moveo One in parallel with your existing destinations. Your current Segment setup keeps working exactly as before.

PlatformPackageSource
Web (Analytics.js)moveo-one-segment-destination-webGitHub
iOS (Analytics-Swift)SegmentMoveoOne (Swift Package)GitHub
Android (Analytics-Kotlin)MoveoOneDestination.kt (drop-in file)GitHub

How it worksDirect link to How it works

The destination runs device-mode (in your app, alongside your other Segment plugins). When Segment dispatches an event, the plugin:

  1. Builds a payload from the Segment event (track / page / screen / identify / group / alias).

  2. Writes it to a durable on-device queue (browser localStorage, iOS Application Support, Android private files) — so events survive page reloads, app kills, and crashes.

  3. Batches events and POSTs them to the Moveo One ingestion endpoint:

    https://api.moveo.one/api/analytic/external/segment-destination

    with your Moveo One API key in the Authorization header.

Delivery is at-least-once; Moveo One de-duplicates on Segment's messageId, so retries never create duplicates.

Get your API key

Your Moveo One API key is the API Token at the top of the Integrations page in the Moveo One app. The same token authenticates every Moveo One integration.

Moveo One Integrations page — the API Token used by every integration


Installation & setupDirect link to Installation & setup

Requirements: @segment/analytics-next 1.x or newer.

Install the destination:

npm install moveo-one-segment-destination-web

Register it after loading Segment:

import { AnalyticsBrowser } from "@segment/analytics-next";
import { moveoOneDestination } from "moveo-one-segment-destination-web";

export const analytics = AnalyticsBrowser.load({
writeKey: "YOUR_SEGMENT_WRITE_KEY",
});

analytics.register(
moveoOneDestination({ apiKey: "YOUR_MOVEO_API_KEY" })
);

That's it — every existing analytics.track(...), analytics.page(...), etc. is now also forwarded to Moveo One.

Prefer zero dependencies? Copy standalone/MoveoOneDestination.ts from the repo into your project instead of installing the package.


What gets forwardedDirect link to What gets forwarded

All standard Segment calls are mirrored to Moveo One:

Segment callForwardedCarries
trackevent name + properties
pagename + properties (web)
screenname + properties (mobile)
identifyuserId + traits
groupgroupId + traits
alias⚠️common fields only

Each forwarded payload preserves Segment's messageId, anonymousId, userId (when set), timestamp, context, and integrations, so user identity and session context stay intact across both systems.


Configuration optionsDirect link to Configuration options

All platforms accept the same options. Only apiKey is required; the defaults are production-ready.

OptionDefaultDescription
apiKeyRequired. Your Moveo One API key. Sent as the Authorization header.
endpoint.../segment-destinationOverride the ingestion endpoint.
debugfalseLog request/response details (console / Logcat).
gziptrueGzip-compress upload bodies. Set false to send plain JSON.
batchSize20Number of events that trigger an immediate flush.
flushIntervalMs30000How often the queue flushes automatically (ms).
maxQueueBytes5000000Max queued bytes before the oldest batches are evicted (5 MB).
maxQueueAgeMs604800000Max age of a queued batch before eviction (7 days).
maxRetries10Upload attempts before a batch is dropped.
filternoneOnly forward events whose properties match — see below.

Filtering which events are forwardedDirect link to Filtering which events are forwarded

Pass a filter to forward only events whose properties (for track/page/screen) or traits (for identify/group) match all of the given conditions (AND logic):

moveoOneDestination({
apiKey: "YOUR_MOVEO_API_KEY",
filter: {
category: ["purchase", "subscription"],
currency: ["USD", "EUR"],
},
});

Only primitive values (string / number / boolean) are matched; an event missing a filtered property is dropped.


Reliability & deliveryDirect link to Reliability & delivery

The destination is built for lossy mobile and web networks:

  • Durable queue — events are persisted on-device before the network call, so they survive reloads, crashes, and reboots.
  • Smart batching — a batch is sealed and sent when batchSize is reached, the request-size limit (~475 KB) is hit, the flush timer fires, or the app/page goes to the background.
  • Exponential backoff with jitter429 Retry-After is honored; 5xx/network errors are retried; non-429 4xx responses are treated as permanent and dropped.
  • At-least-once + de-dup — Moveo One de-duplicates on messageId, so retried batches never double-count.

Verify the integrationDirect link to Verify the integration

  1. Enable debug: true (web/iOS) or debug = true (Android) and trigger a few Segment events.
  2. Confirm a POST to …/api/analytic/external/segment-destination returns 2xx.
  3. Open the Moveo One app and confirm sessions and events appear on your dashboard.

TroubleshootingDirect link to Troubleshooting

  • 401 / 403 — wrong or missing apiKey. Re-copy the token from the Integrations page.
  • Nothing arrives — check that your other Segment destinations receive the same events (rules out a Segment-side issue), then enable debug to inspect the outgoing request.
  • Events delayed — batches flush every 30 s by default; lower flushIntervalMs or batchSize for near-real-time delivery during testing.

Need help? Reach us at support@moveo.one.