Allow adding only specific integrations
It should be possible to split this into multiple packages, e.g. okgrow:analytics-google, okgrow:analytics-mixpanel, etc.
I haven't investigated but we could probably split out the integrations from analytics.js into separate packages.
Note that I've tested it and we would only save about 40k currently. Less if you use more than one integration.
Segment.io provides seperate repo's for each integration. You can check them all out here. I think it is a good idea as it will solve all the enhancement requests. Will need to think of a good way to implement this.
We plan to address this issue by unbundling the currently embedded customized Segment analytics.js module which will allow much greater flexibility by having users of this package install what they need from Segment’s module.” You will see this coming in version 4.0.0 of this package and version 2.0.0 of the https://github.com/okgrow/auto-analytics package in the next couple of weeks.
@ccuilla so how does the latest version of this package function? Is analytics.js embedded or it needs to be added separately as in auto-analytics ?
@Macbit The latest version (3.0.5) of this (the Meteor) package has a dependency on version 1.0.6 of our underlying npm package https://github.com/okgrow/auto-analytics. Version 1.0.6 of that package still includes our build of the most common Segment analytics integrations. In short you should just be able to install this package and get the whole thing.
At this point we have not updated the Meteor package to depend on version 2.x of https://github.com/okgrow/auto-analytics which removes the embedded analytics.js so you can roll your own.
I hope this helps clarify things.