segmentio/analytics.js — explained in plain English
Analysis updated 2026-06-26
Track a user signup once and automatically send the event to Google Analytics, Mixpanel, and Facebook Ads simultaneously.
Switch analytics destinations on or off from a settings dashboard without deploying new code.
Send user behavior data to a warehouse like Amazon Redshift or Google BigQuery for SQL querying.
| segmentio/analytics.js | gitpoint/git-point | transitive-bullshit/create-react-library | |
|---|---|---|---|
| Stars | 4,759 | 4,760 | 4,761 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
This is the legacy version, the README recommends analytics-next for new projects.
Analytics.js is an open-source JavaScript library built by Segment that lets you track user behavior on a website and send that data to many different analytics services at once. Instead of writing separate code for each tool you want to use, such as Google Analytics, Mixpanel, or Facebook Ads, you write a single set of API calls and the library handles routing the data to every destination you have switched on. You can add or remove any service from a settings dashboard without touching your code again. The main idea is a single tracking call that fans out to multiple tools. When a user completes an action on your site, you record that event once, and the library forwards it to whichever services you have connected. The project supports more than 250 destinations, covering categories like email marketing, advertising platforms, session recording, and data warehouses such as Amazon Redshift and Google BigQuery. Sending data to a warehouse also lets you query your user behavior history in SQL without building your own data pipeline. This repository contains a pre-built, standalone version of the library that you can use without a paid Segment subscription. If you need a smaller build with only the plugins relevant to your setup, the project wiki explains how to compile a custom version. The core logic and each integration plugin live in separate repositories under the Segment GitHub organization, so issues can be filed against the right piece. One thing worth knowing: this is the older generation of the library. The README itself links to a newer version called analytics-next as the current recommended path. If you are starting a new project with Segment today, that repository is likely where you should begin. The library is released under the MIT license.
A JavaScript library that sends your website's user-behavior events to 250+ analytics services at once with a single API call. Add or remove destinations from a dashboard without touching your code.
Mainly JavaScript. The stack also includes JavaScript.
Free to use for any purpose, including commercial use, as long as the MIT license notice is kept.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.