Respectlytics Respect lytics
Sign In Start Free Trial
Menu
Replace Segment (Twilio) Self-hosted deployment

Replace Segment (Twilio) with self-hosted analytics

Migrate from Segment (Twilio) to self-hosted Respectlytics. AGPL-3.0 server, MIT SDK. Helps developers avoid collecting personal data.

β–ΈExample Segment (Twilio) call (the "before")

kotlin Respectlytics
import com.segment.analytics.kotlin.android.Analytics
val analytics = Analytics("YOUR_WRITE_KEY", context) {
 collectDeviceId = true
 flushAt = 20
}
analytics.identify(userId, traitsOf("email" to email, "plan" to "pro"))
analytics.track("Paywall Purchase", buildJsonObject {
 put("value", price)
 put("currency", "USD")
})

Regulated industries β€” telehealth, fintech, government, defence β€” frequently require that analytics data never leave operator-controlled infrastructure. Respectlytics's self-hosted option (AGPL-3.0 server + MIT-licensed SDKs) lets you run the entire analytics stack on your own hardware. The SDK is the same; only the API endpoint changes.

β˜‘Remove Segment (Twilio) cleanly

  1. 1

    Remove the Segment Analytics SDK from your build (Analytics-Swift / analytics-android / @segment/analytics-react-native / segment_analytics_flutter)

  2. 2

    Remove Analytics.client(writeKey: ...) and analytics.track(...) call sites β€” replace with Respectlytics.track("event_name")

  3. 3

    Critically: review your Segment destinations and decide which destinations you still need data flowing to from Respectlytics (most don't β€” that's the point)

  4. 4

    Delete the Segment workspace's mobile source once events have stopped flowing

  5. 5

    Audit and remove the downstream destination SDKs that Segment was the only reason to forward to (e.g., Facebook Pixel, Google Ads)

⇋Segment (Twilio) vs Respectlytics β€” self-hosted deployment

Segment (Twilio)Respectlytics
Self-hostableβ€” see tool note above (typically no)Yes (AGPL-3.0 server)
Operator-managed databaseβ€” typically noYes (you choose Postgres deployment)
Air-gapped deployment possibleNoYes
SDK licenseβ€” variesMIT (permissive)
Server licenseβ€” typically closedAGPL-3.0 (source-available)

❓Frequently asked questions

What's the AGPL-3.0 obligation in practice?

If you modify the server source AND offer the modified server as a service to third parties over a network, you must publish your modifications under the same license. Internal self-hosting for your own apps does NOT trigger publication obligations. Consult your legal team for specific applicability.

What infrastructure do we need?

A Linux host (or container) running Python 3.12 + Postgres 14+ + a reverse proxy (nginx / Caddy). The default configuration scales to ~10 million events/day on a 4-vCPU / 8 GB box; larger deployments scale horizontally. See the public README for hardware sizing guidance.

Do we get updates automatically?

No β€” self-hosted deploys pull the latest source and run migrations on a cadence you control. We publish release notes for each version. No auto-update; you decide when to upgrade.

Are the SDKs AGPL too?

No β€” SDKs are MIT-licensed. Fork and modify freely with no copyleft obligation. Only the server is AGPL.

β‡’Related migration guides

Replace Segment (Twilio): no att prompt Same tool, No ATT prompt Replace Segment (Twilio): no pii collected Same tool, No PII collected Replace Segment (Twilio): no phi collected Same tool, No PHI collected Replace Segment (Twilio): 5-field event schema Same tool, 5-field event schema Replace Segment (Twilio): ram-only event queue Same tool, RAM-only event queue Replace Segment (Twilio): fewer third-party sdks Same tool, Fewer third-party SDKs Replace Segment (Twilio): smaller app binary Same tool, Smaller app binary Replace Segment (Twilio): faster cold start Same tool, Faster cold start Replace Segment (Twilio): eu data residency Same tool, EU data residency Replace Segment (Twilio): open-source sdk + server Same tool, Open-source SDK + server Replace Firebase Analytics: self-hosted deployment Same outcome, Firebase Analytics Replace Google Analytics for Firebase: self-hosted deployment Same outcome, Google Analytics for Firebase

Track what matters. Collect nothing you don't.

Five-field event schema, RAM-only event queue, no IDFA, no AAID, no persistent user IDs. Helps developers avoid collecting personal data in the first place.

Get started with the SDKs See pricing

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /