In Segment, how do device-mode and cloud-mode destinations differ?
answer
- one path goes through Segment's servers
- the other bundles the vendor's SDK
- only one of them can be replayed or filtered
- ad blockers only reach the client-delivered copy
basics
~20 sA cloud-mode Segment destination receives events from Segment's servers, so Segment can filter, transform, retry and replay them. A device-mode destination gets the vendor's own SDK bundled into the client and receives events directly from the browser or app.
solid answer
~50 sIn **cloud-mode**, the client sends the event to Segment, and Segment's servers translate and forward it to the destination's server API. Because the event traverses Segment's pipeline, destination filters, transformations, server-side retries and replay of archived events all apply, and the client bundle stays small. In **device-mode**, Segment loads the vendor's own SDK into the page or app and the event is delivered straight from the client to that vendor. You need device-mode when the destination's value depends on being in the client — session replay, in-app messaging, ad pixels that read browser cookies, flicker-free experiment rendering. The costs are real: a bigger bundle, an extra script that ad blockers and tracking protection can kill, no server-side retry, and no replay into that destination. Many setups run a destination in device-mode for those features and everything else in cloud-mode.
code
text · 3 linescloud-mode: browser -> Segment -> (filters, transforms, retries, archive) -> vendor API
device-mode: browser -> vendor SDK -> vendor API
browser -> Segment -> warehouse + other destinationsgo deeper
Know that Segment can deliver an event either from its own servers or from a vendor SDK loaded in the page, and that the choice is a per-destination setting.
Explain the mechanics on both paths: what Segment can do only when it forwards the event, and why bundling a vendor SDK adds page weight and a blockable third-party script.
Diagnose a reporting gap by asking which mode the destination runs in, comparing against the warehouse copy, and separating blocked client deliveries from filters and mapping failures.
Own the policy: which destinations are allowed into the client at all, how consent and privacy controls are enforced when the pipeline is bypassed, and what page-performance budget third-party SDKs get.
## Two delivery paths for the same event When you call `analytics.track('Order Completed', {...})` in the browser, Segment has two ways to get that event to a given destination, chosen per destination in the source's settings. Understanding which path a destination is on explains most of the surprises teams hit later: mismatched numbers, events missing from one tool but present in the warehouse, filters that mysteriously do not apply. ## Cloud-mode In cloud-mode the event goes from the client to Segment's collection endpoint. Segment stores it, applies whatever pipeline logic you have configured, and then calls the destination's **server-side API** with a payload mapped into that vendor's schema. Everything Segment can do for you lives on this path: - **Destination filters and transformations** — dropping, sampling or reshaping events per destination, because Segment holds the event before forwarding it. - **Server-side retries** — a destination API that is down or rate-limiting gets retried from Segment's infrastructure rather than from a browser tab that has already closed. - **Replay** — Segment archives the raw event stream, so a destination added later can be backfilled from history, and a destination that dropped events during an outage can be re-sent. - **Consent and privacy controls applied in the pipeline** — because the pipeline is the chokepoint every cloud-mode event passes through. - **A small client bundle** — no vendor code ships to the user. Cloud-mode also works for events that never touch a browser at all: server libraries and cloud sources feed the same pipeline, so a purchase confirmed by your backend can reach the same marketing tool. ## Device-mode In device-mode, Segment's client library loads the destination vendor's **own SDK** into the page or mobile app, and the call is handed to that SDK, which talks to the vendor directly. Segment still receives its own copy for the warehouse and for other destinations, but the copy that reaches this vendor did not go through Segment's forwarding path. Device-mode exists because some destinations genuinely cannot be served from a server. Session replay and heatmaps need to observe the DOM. In-app messaging and push SDKs need to render UI and register tokens. Experimentation SDKs need to decide a variant before first paint to avoid flicker. Advertising and attribution pixels need browser cookies, device identifiers and the referrer as the browser itself sees them. A server-to-server call cannot reproduce any of that. ## What device-mode costs you - **Bundle weight and a third-party script** on every page load, with the availability and performance of that vendor now on your critical path. - **Ad blockers and tracking protection** frequently block the vendor's script, and sometimes Segment's own, so the client-delivered copy is lost while the server-side copy survives. This is the single most common cause of "the tool shows fewer conversions than the warehouse". - **No server-side retry.** Delivery is best-effort from a page that may unload mid-flight. - **No replay and no destination filters** for that destination — Segment is not in the path, so it cannot re-send or reshape what it never forwarded. - **The vendor's own identity and session logic** applies, which is why session counts and unique-user counts diverge between a device-mode tool and the warehouse even when no events were lost. ## Choosing, and mixing The practical default is cloud-mode for anything that is fundamentally "receive an event and store it", and device-mode only where a client-side capability is the reason you bought the tool. Some destinations support both simultaneously — device-mode for the features that need it and cloud-mode for the rest — and Segment's docs for each destination state which modes it supports. Note that running both can double-count if the same event is delivered twice; the destination's Segment integration usually handles this, but it is worth verifying against a known event volume. You can also override routing per call. The third options argument accepts an `integrations` object keyed by destination name, so a sensitive event can be excluded from one vendor without a redeploy of your routing rules — although a destination filter configured centrally is usually the better place for a durable rule, since it does not require a client release. ## Debugging in practice When a stakeholder says a tool is under-reporting, the first question is which mode that destination runs in. If it is device-mode, compare against the warehouse copy: a gap concentrated on ad-blocking-heavy traffic, or on mobile browsers with strict tracking protection, points at the bundled script rather than at your instrumentation. If it is cloud-mode, the gap is more likely a destination filter, a mapping that drops events missing a required field, or delivery errors visible in Segment's own event delivery view.
- Why might a device-mode destination report fewer conversions than the same events in the warehouse?Because the two copies travel different paths. Ad blockers and tracking protection can block the bundled vendor script while Segment's server-side copy still reaches the warehouse; a page unloading mid-call loses a client delivery that has no server-side retry; and the vendor's own session and identity logic may window or de-duplicate differently. Compare the gap by traffic segment before blaming instrumentation.
- Which Segment capabilities apply only to cloud-mode destinations?Destination filters, destination-level transformations, server-side retries, and replay of archived events — all of them live in Segment's pipeline, which a device-mode event bypasses on its way to the vendor. Consent rules enforced in the pipeline likewise cannot police a bundled SDK, so client-side gating is required there instead.
- When is device-mode genuinely unavoidable?When the tool's value is a client-side capability: session replay and heatmaps that observe the DOM, in-app messaging and push registration, experimentation SDKs that must choose a variant before first paint, and ad or attribution pixels that need browser cookies and device identifiers. A server-to-server call cannot reproduce any of those.
Cloud-mode is posting a letter through a mailroom that keeps a copy and can re-send it; device-mode is handing it to the courier at your front door.
saying these in an interview costs you the question
- Thinks device-mode events can be replayed by Segment
- Assumes cloud-mode avoids all ad-blocker loss
- Enables device-mode by default for every destination
- Believes device-mode and cloud-mode always report identical numbers
- Cannot say why a bundled vendor SDK would ever be needed