# Segment Analytics.js: 6.5 out of 10

Reasonable, with limits. 7th of 9 in [Product analytics SDKs](https://elestia.ai/opensource/analytics/index.md).

Analytics.js 2.0 (@segment/analytics-next) is the official browser SDK for Twilio Segment, a paid customer data platform. It is mature and typed, and it is the right pick if you already route events through Segment. For new product-analytics work, PostHog grows much faster and its repository is far more active.

**Best for:** Teams that already pay for Segment and want one event stream routed to many downstream tools.

## Scores

- **Overall: 6.5** (likely 5.4 to 7.5)
  - Claude Opus 5.5 (5.5): If your company runs on Segment, this is the correct and well-supported SDK to use. As a choice for a new project's analytics, it ties you to a costly paid CDP, its repository is quiet, and it is growing more slowly than its peers. PostHog JS is the better default for most new product-analytics work.
  - GPT-6.2 Sol (7.4): Segment is a strong choice for new web projects that need reliable event delivery to several destinations and already want Twilio Segment. PostHog JS is the stronger default for a new team that wants autocapture, replay, and product reporting in one setup. The value of central routing varies by project, and below-median download growth gives limited confidence that Segment is gaining share.
- **Needed by many: 5.4** (likely 4.3 to 6.7)
  - Claude Opus 5.5 (4.5): Many web app teams need product analytics. This SDK serves only the subset that uses Segment as a CDP or event router. It runs in browsers only, and a Node package from the same monorepo covers servers.
  - GPT-6.2 Sol (6.2): A large share of web product teams need to measure user behavior. This package serves browsers across frameworks, with the strongest fit for teams that route the same events to several systems. Web measurements show how common analytics is, with less certainty about how many teams need that routing layer.
- **Helps a lot: 6.9** (likely 5.8 to 7.9)
  - Claude Opus 5.5 (6.0): It is a mature, typed SDK with plugins, batching, a consent hook and a large destination catalogue. Open issues show real rough edges: dynamic imports break when re-bundled, storage quota errors, config options with no effect, and CSP problems from loading remote destination code. It does no analysis itself and depends entirely on the paid Segment service.
  - GPT-6.2 Sol (7.8): Version 1.84.4 offers a straightforward typed API, documented setup examples, retries, batching, and middleware. The examples give coding agents clear patterns for basic tracking, though agent accuracy has little direct evidence. A rebundling issue and the page-load cost measured in one test highlight limits that depend on the build and enabled destinations.
- **Holds up over time: 6.7** (likely 5.3 to 8.0)
  - Claude Opus 5.5 (6.0): Twilio funds it and it still ships: 11 releases in the last year, the latest on 2026-11-17. Commit volume is low next to peers (44, against PostHog's 2,935 and Amplitude's 565), and many issues get no visible reply. Twilio reviewed whether to sell Segment and decided to keep it, which lowers but does not remove the risk around the business unit.
  - GPT-6.2 Sol (7.3): Twilio maintains Analytics.js as a flagship SDK, and the browser package published eight versions in the past year. Recent fixes shipped within the 1.x line, though one browser rebundling report has stayed open for about a year. The shared repository has a quieter commit cadence than PostHog’s or Amplitude’s, and long-term support depends on Twilio’s priorities for Segment.
- **Used widely: 6.2** (likely 5.1 to 7.3)
  - Claude Opus 5.5 (6.0): It had 10.8M downloads in four weeks, up 3.3x on a year ago. That is below the 4.1x median, so it is losing ground, while PostHog grew about 12x. Only 398 dependent repositories were counted, fewer than Mixpanel (1,218) or PostHog (2,707). Many installs probably come from CI and from enterprise apps rather than from new choices.
  - GPT-6.2 Sol (6.3): Monthly npm downloads grew 3.27×, below the catalog median of 4.1× and well behind PostHog JS, suggesting Segment lost relative ground. The collector found 398 dependent repositories, close to Amplitude and below Mixpanel and PostHog. BuiltWith detects Segment on about 125,000 live sites, capturing web use that npm misses, though the detections include multiple versions and installation methods.
- **Vouched for: 6.1** (likely 4.7 to 7.4)
  - Claude Opus 5.5 (5.5): Segment is a long-established CDP with many enterprise customers, and it gets a lot of reviews on sites like Capterra. I found no independent benchmarks or developer-survey data on the SDK itself, and no current community discussion of it. Most comparisons I found are written by competing vendors.
  - GPT-6.2 Sol (6.6): PostHog documents a Segment integration for core events and identities, and a recent buyer interview describes a developer-tools company keeping Segment for production event logging after changing its reporting stack. Independent evidence is stronger for Segment’s routing workflow than for satisfaction with this specific SDK version. The available performance benchmark covers a single setup.
- **Safe: 7.3** (likely 5.9 to 8.6)
  - Claude Opus 5.5 (7.0): It has no advisories on record, an MIT licence and 11 dependencies, and a company stands behind the releases. There is no Scorecard data. At runtime it loads destination code from Segment's CDN, which widens the attack surface and can conflict with CSP. Like any tracking SDK, it sends user data to a third party.
  - GPT-6.2 Sol (7.5): The SDK uses the MIT license, and the collector found zero advisories against the package itself. Automated releases use npm trusted publishing, and a vulnerable js-cookie dependency was patched about two months after the repository report. Eleven direct dependencies, runtime scripts from enabled browser destinations, and gaps in evidence about repository controls and publisher access keep the range wide.

## Good

- One track/identify/page API feeds hundreds of Segment destinations, so you don't need a separate SDK per tool.
- Written in TypeScript, with a plugin and middleware system and a smaller bundle than classic analytics.js.
- MIT licence, no known advisories, and regular releases from a company that funds the work.
- Patterns for track, identify and page are widely documented, so AI coding agents tend to write correct calls.

## Bad

- It only makes sense with a paid Segment workspace, and pricing by monthly tracked users gets expensive at scale.
- Repository activity is low (44 commits in a year), and many open issues have no visible maintainer reply.
- Users report bugs with re-bundling in Vite or esbuild, localStorage limits, CSP violations from remote destination scripts, and type mismatches.
- Downloads grew more slowly than the median, and much more slowly than PostHog or Vercel Analytics.

## The numbers

- Downloads, 4 weeks: 11M
- In a year: ×3.3
- GitHub stars: 480
- Commits, 12 months: 44
- Last npm release: Nov 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/segmentio/analytics-next
- npm: https://www.npmjs.com/package/@segment/analytics-next

The SDK of an analytics service that is not open source.

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
