Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Next-react-analytics – A react analytics library (npmjs.com)
3 points by kushalvm on Oct 12, 2019 | hide | past | favorite | 1 comment


Next-react-analytics - An analytics library for React that's utterly butterly simple.

I've been delaying writing about this first open source I wrote. To improve the readme, demo, articulate it better somewhere, improve the publish process etc etc. But there is a lot of work which will keep me busy for next few months and there's no good time to share. Doing it now post midnight. :)

So, here's an analytics library that works with Redux events out of the box. Declare one event listener for all your redux events and it will trigger the code you write inside it. Yes, that's right. That ridiculous!

A quick example of a universal event listener

```function getQuoteListener(event, eventsHistory){ window.dataLayer.push(event); return event; }```

What about specific event types? Don't worry, got all covered. Readme will uncover more

It's very specifically tied to redux actions so far. So if your application is structured in a way ( should be if you use redux ) it would sure be helpful for you.

Please share your feedback. I'm excited about it as my first open source release.

Links-1. https://www.npmjs.com/package/next-react-analytics 2.https://github.com/kushalmahajan/next-react-analytics

#react #analytics #opensource #javascript #library #engineering #turtlemint




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: