- Add any dependencies to
package.json
- List any new integrations to enable in
lib/integrations.js
- Run
make analytics.min.js
to build that file as well asanalytics.js
(make distclean
will clear node_modules, andmake clean
will clear the output files) - Copy the resulting files into
www/static/analytics
within thet3
repo
Analytics.js makes it easy to collect customer data and send it to many different tools using a single, unified API.
Analytics.js is open source and is one of the libraries that powers Segment, the managed, hassle-free way to collect customer data in the browser and beyond.
For our mobile and server-side data collection libraries, check out our libraries page.
First, read the Analytics.js QuickStart, which contains installation instructions and a brief overview of what Analytics.js does and how it works.
For more detail on the Analytics.js API, check out the Analytics.js Library Reference.
Analytics.js for Platforms is a version of analytics.js built specifically for website creation and e-commerce platforms to give their customers one-click enablement of Google Analytics, Facebook Pixel, Google Adwords, and Segment. For more information, you can check out the docs for Analytics.js for Platforms. Segment hosts this version of the library for free use on its CDN.
This repository houses a pre-built, open-source version of analytics.js. The core logic of analytics.js is broken out into individual repositories:
- To report an issue with analytics.js itself, head over to analytics.js-core, where the core analytics.js logic is maintained.
- To report an issue with an integration. head over to the analytics.js-integrations organization, where we keep each integration in its own repository.
If you're not sure where to open an issue, feel free to open an issue against this repository or contact us and we'll help point you in the right direction.
Released under the MIT license.