Fork me on GitHub
#re-frame
<
2021-02-23
>
Ronny Li17:02:53

Hi everyone 👋 Has anyone here set up https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/ as an interceptor on all their re-frame events? How did you do it? I'm thinking this would be a simple way to automatically track any new event that we add to our app.

Ronny Li12:02:14

Thank you! I started going the interceptor route but it occurred to me that auto-generating Segment events might not be a good idea (even though it sounds cool). As soon as you start tracking an event you typically don't want to rename any of the properties otherwise you end up invalidating old data and making life difficult for your analysts. If I use an interceptor to auto-generate events I would shackle my developers, preventing them from re-organizing and renaming data as they see fit. IMO it's better to just manually specify the Segment event so it's explicit exactly what is getting sent to Segment.