This is a fork of Segment's analytics.js and #PR 154 by rcline.
This repository houses a pre-built version of analytics.js
containing every analytics integration supported by Segment.
- Clone the repo down
git clone https://github.com/okgrow/analytics.js.git
cd analytics.js
npm install && npm run build
- The build will output these two files:
analytics.js
andanalytics.min.js
Too reduce the final bundle size, you should remove any integrations that you are not using. To do that:
- Open up the
lib/integrations.js
file and remove all the integrations that you are not using. npm run build
- Your
analytics.js
andanalytics.min.js
will now only contain the integrations you are using.
You can now include the analytics.min.js
file with your project to add analytics to your web app.
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 coreanalytics.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.
Released under the MIT license.