DavidWells / analytics

Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
https://getanalytics.io
MIT License
2.45k stars 244 forks source link

Broken `analytics-node` initialization in `analytics-plugin-segment` #442

Open shapel opened 5 months ago

shapel commented 5 months ago

Hello @DavidWells , First of all, thank you for your effort in creating such a library 💪

Looks like analytics-plugin-segment is broken for nodejs as it use wrong initialization for analytics-node at https://github.com/DavidWells/analytics/blob/master/packages/analytics-plugin-segment/src/node.js#L48

image

By the way analytics-node is deprecated so we could switch to maintained one @segment/analytics-node https://segment.com/docs/connections/sources/catalog/libraries/server/node/migration/

PS Feel free to ping me if you would like me to create PR with such changes.

cbaker6 commented 3 months ago

Probably related, but I can confirm that >=2.0.0 of @analytics/segment doesn’t work (not sending any analytics to Segment), but version 1.1.4 does work.