Sourcemap Explorer
Stack · npm package

@segment/analytics-next

Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.

latest 1.84.1· MIT· 158 versions publishedView on npm

About

Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.

What detecting @segment/analytics-next tells you about a site

Segment is a customer-data pipeline rather than an analytics destination, so finding @segment/analytics-next tells you the team routes a single stream of events to many downstream tools at once. Its presence implies a mature data strategy: instrument once, fan out to analytics, marketing, warehouses and advertising platforms through Segment's hub. This is a strong organisational signal, because Segment is typically adopted by companies with several teams consuming the same event data. The analytics-next namespace is the modern rewrite of the older analytics.js, so it also marks a relatively current integration of that pipeline.

Why the exact @segment/analytics-next version matters

analytics-next is the ground-up successor to the classic analytics.js, so spotting it already places the integration in the modern generation. Its own versions refined plugin and middleware APIs, consent and privacy handling, and how it loads downstream destinations, so the exact version affects which integrations load client-side versus server-side and how user consent gates them.

@segment/analytics-next in a real-world stack

When you find @segment/analytics-next in a bundle, it rarely travels alone. Acts as a hub, so its real companions are the downstream destinations it forwards to rather than a fixed sibling library.

Quick facts

Latest version1.84.1
LicenseMIT
Installnpm install @segment/analytics-next
Direct dependencies11

What @segment/analytics-next pulls in

@segment/analytics-next declares 11 direct dependencies — each one also rides into any bundle that ships @segment/analytics-next, so they are detection targets too. Reading them is a quick way to understand the package's real footprint .

dsettslibunfetchjs-cookienode-fetch@lukeed/uuid@segment/facade@segment/analytics-core@segment/analytics-page-tools@segment/analytics-generic-utils@segment/analytics.js-video-plugins

How Sourcemap Explorer detects @segment/analytics-next

@segment/analytics-next ships as v1.84.1, published 2026-07-20 and carries 11 direct dependencies, 158 versions on the registry. Those exact numbers are the footprint Sourcemap Explorer matches when @segment/analytics-next rides inside a deployed bundle — here is how the detection works.

We catch @segment/analytics-next from two complementary signals: bundled source paths and the embedded package.json. Modern bundlers (webpack, Vite, esbuild, Rollup, Turbopack) preserve the original node_modules/@segment/analytics-next/ paths inside the JavaScript sourcemap's sources[] array — that's the canonical signal. When the matching package.json is also captured in sourcesContent[], we read the exact version field — patch number included. No regex guessing, no version inference.

  1. 1

    Confirm the site exposes sourcemaps

    In DevTools Network, check the response headers of any application script for `SourceMap` or `X-SourceMap`. Failing that, fetch the script's last 4 KB and look for a `//# sourceMappingURL=` comment — that map is where the `@segment/analytics-next` paths live.

  2. 2

    Find the package in the bundle

    Open DevTools → Network → reload. Click any application script and look at its sourcemap. Inside, search `sources[]` for entries matching `node_modules/@segment/analytics-next/` — every match confirms the package is bundled. The matching `sourcesContent[i]` for `node_modules/@segment/analytics-next/package.json` gives you the exact installed version.

  3. 3

    Read the version directly from package.json

    Run `jq -r '. as $m | $m.sources | to_entries[] | select(.value | endswith("node_modules/@segment/analytics-next/package.json")) | $m.sourcesContent[.key] | fromjson | .version' bundle.js.map`. Sourcemap Explorer automates the same query in the popup.

Recent versions

Version
Released
1.84.1
2026-07-20
1.84.0
2026-04-29
1.83.0
2026-04-16
1.82.0
2026-03-05
1.81.2
2026-03-04
1.81.1
2025-07-09
1.81.0
2025-04-22
1.80.0
2025-04-15

@segment/analytics-next README

Live mirror of the GitHub README, for reference. Updated whenever the repo's default branch changes.

🎉 Flagship 🎉

This library is one of Segment’s most popular Flagship libraries. It is actively maintained by Segment, benefitting from new feature releases and ongoing support.



Welcome to the monorepo for Segment's latest Javascript / Typescript SDKs

analytics.js (analytics-next)

Packages

Contributing

FAQ

What is @segment/analytics-next used for?

Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.

How can I tell if a website is using @segment/analytics-next?

Open the page in Chrome with the Sourcemap Explorer extension installed and read the Stack tab. We catch `@segment/analytics-next` from two complementary signals: `node_modules/@segment/analytics-next/` paths inside the JavaScript sourcemap, and the embedded `package.json` we read for exact-version detection. Without the extension you can do the same lookup manually in DevTools — the steps are listed in the "How Sourcemap Explorer detects" section above.

How do I find out which version of @segment/analytics-next a website is running?

Read it straight from the site's JavaScript sourcemap. When a build ships source maps, the bundled `@segment/analytics-next/package.json` carries the exact `version` string — Sourcemap Explorer extracts it in one click on the Stack tab, and you can do it by hand in DevTools by opening the `.map` file and searching for `node_modules/@segment/analytics-next/package.json`. That is far more reliable than inferring the version from an asset-hash or a `?ver=` query string, which is all surface-level detectors have to go on. The current npm release is 1.84.1, but real deployments frequently run an older pinned version — which is exactly why reading the bundled number matters.

What is the latest version of @segment/analytics-next?

1.84.1, as published on the npm registry. The "Recent versions" table on this page lists the most recent 8 releases with their release dates. Sourcemap Explorer reports the version actually bundled into a site, which can lag the latest release by months on real-world deployments.

Is @segment/analytics-next actively maintained?

Very actively maintained — the last release shipped within the past three months. The last published release was 2026-07-20. Source code: https://github.com/segmentio/analytics-next.

Where can I read more?

Project homepage: https://github.com/segmentio/analytics-next#readme. Source code: https://github.com/segmentio/analytics-next. Published on npm: https://www.npmjs.com/package/@segment/analytics-next. Licensed as MIT.

Detected by Sourcemap Explorer

When a bundle ships sourcemaps, we read the embedded package.json for @segment/analytics-next and report the precise version (the registry's latest is v1.84.1, published 2026-07-20; the bundled copy is often older). Without sourcemaps, an import / require in the page's scripts is enough to flag it.

Install free on Chrome