-
Notifications
You must be signed in to change notification settings - Fork 734
Building a Custom Distribution
This repository provides machinery for building a custom version of analytics.js. Analytics.js is composed of several libraries:
-
analytics.js-core: The logic and API layer of analytics.js. If you want to change how a core tracking method (e.g.
#track
) works, this is where you'd start. - analytics.js-integrations: All analytics.js integrations are split into individual repositories and are loaded here as simple plugins. If you'd like to change how an individual integration sends data to its end tool, start here.
If you're just looking to install Analytics.js on your website through Segment, check out the Analytics.js QuickStart. If you're looking to build a custom version of analytics.js for use outside of Segment, read on.
Before you get started, you'll need to download and install Node 0.12
. You can find installation instructions on the official node.js website.
To produce a built version of analytics.js, run:
$ make build
This will automatically download any necessary dependencies and build the library, producing analytics.js
and analytics.min.js
.
If you want to edit which integrations are included in the build, edit the following files and re-run make build
:
component.json
lib/integration.js