segment-integrations / analytics.js-integration-segmentio

The Segmentio analytics.js integration.
MIT License
8 stars 28 forks source link

Question about using onpage() vs just page() ? #43

Closed ferozed closed 5 years ago

ferozed commented 6 years ago

I was looking at the code of this extension. This may be a newbie question - but, why is this extension using onpage() and ontrack() events, and not just overriding page and track from the Integration ? For eg. like the google-analytics extension?

f2prateek commented 6 years ago

It was done historically since we didn't customers to accidentally disable the Segment integration by sending 'Segment.io: false' or 'All: false'. We may revisit this at some point in the future though.