Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Has anyone found a great solution for building analytics in your app?
8 points by rogansage on June 20, 2023 | hide | past | favorite | 15 comments
It seems there are generally only two (imperfect) options for building analytics in your app:

- either use a BI tool/out-of-the-box tool and embed an iframe (giving you very limited control and flexibility over the components & styling)

- or build it yourself which allows you to make it look fully native, but turns out to be quite a heavy undertaking when you factor in design/build/maintenance/infrastructure/data management/QA/feature requests/personalisation/localisation/performance/accessibility etc. etc.

Has anyone else been forced to select one of these two imperfect options?

We've just started working on something to address this issue - I'd love to hear about peoples experiences to help work out what the ideal solution might be




I'm not sure what analytics systems you are referring to but most do not use an iframe. In most cases you embed some Javascript and depending on what you want, you might get a simple POST with some data about the page or you might have something more like Hotjar where a lot of telemetry is sent in order to understand much more about your app like where people move their mouse or how long they spend before clicking.

My advice is the same as it would be with everything: Add value to your product in the best/unique way that you can and leave the other stuff to other people who are really good at theirs. I don't know very much about analytics so I won't waste time building a system. I am, however, very good at architecture and hosting systems so I will invest my time making those things better.


Thanks for the reply @Ibriner! - you're right, there's usually an iframe and a javascript option with tools like PowerBI/Looker etc. Still the problem of inflexibility remains with any third-party tool I've found.

On the topic of sticking to the things you're good at. Would you be interested in a solution that allowed you all the flexibility to build a fully-native-looking experience for your customers whilst handling things like building components, localisation, and all of the boring bits for you?


Custom analytics, very barebone:

- A single “events” table in my DB (Postgres)

- A simple POST /track request with some conventions: a type (error or analytics), a name and a jsonb of data (with similar conventions).

- A couple of Postgres views for very specific “dashboards”: paying customers, referrers per week, etc…

- A telegram bot with a few buttons that allows me to quickly get insights about the health of my system and analytics on the go

- Privacy is very dear to me: I have full control over the code and storage and can ensure that only the utmost minimum is stored when it comes to my users’ data (I am blind of some fronts due to this but it’s a trade off that I’m willing to make)

(In total I probably spent 10h building it, over the course of 4 years: very much worth it)


Related: https://news.ycombinator.com/item?id=35859937

From my answer[0] thereon:

> you might be "successful" doing what you're proposing (if you choose a tiny feature set, and discard everything else everyone asks you for)

> ...but the reason "out-of-the-box solutions" exist is because other folks have already spent the millions of developer hours, user feedback, etc to get it working :)

-----------

[0] https://news.ycombinator.com/item?id=35860349


Thanks warrenm! - it sounds like the issue I describe is one that you've seen smart people come up against. Would a fair description of a perfect tool in your mind then be something like:

A analytics experience that A) looks like a nicely integrated part of our platform and, B) which doesn't force us to spend millions of developer hours, user feedback, etc to get it working

This I think would be an 'ideal solution' - if we could achieve that with what we're building do you think it would be useful or would there be more problems you'd foresee?


Honestly ... you can hit "looks like a nicely intregated part of our platform" by some CSS (or tool-specific version of the concept)

...but why is it important to you that the solution look "nicely integrated"?

Most organizations I deal with (spoiler - I work in the analytics and automation space in presales, architecture, and PS delivery) want a centralized analytics tool (or a couple) that integrate all their disparate sources into a "single pane of glass" (sorry for the buzzword-compliance ... but it happens to be a good one here)

Please note what I am NOT saying: I am NOT saying "don't build / integrate an in-app analytics offering".

What I AM saying: "be sure that's a good use of your limited resources instead of partnering with someone else's tool/platform that does what you want"


>This I think would be an 'ideal solution' - if we could achieve that with what we're building do you think it would be useful or would there be more problems you'd foresee?

What I "foresee" is you're going to end up devoting more and more effort into something that is not 'core' to your app/platform

Maybe that's a good thing

Maybe it isn't

Personally ... using another cliche, I prefer to not 'reinvent the wheel' when I can use a perfectly good one that already exists (maybe I need an axle adapter and gear box to connect ... but those are a lot easier to implement than the whole shooting match)


I completely agree! What we're trying to build is a solution for other companies (not to build it for our own app) that hits that sweet spot in the middle - i.e. one that allows companies which currently have to make the trade off between the whole shooting match and the axel adapter... where they can build the bits they need to customise and buy the stuff they don't

Do you think a best of both worlds solution would be valuable? (even if not immediately obvious how it could be possible!)


So you want to become an analytics platform/tool?

Go for it

You've got some big players in the space already (some entrenched for decades) - but you may be able to find a niche you can serve better


I assume that by "limited components and styling" is about the stats displayed by the analytics dashboard?

With UXWizz[0], I provide both: you get a UI with a bunch of useful pre-made graphs and data displayed by default, but you also have direct access to the MySQL database where the data is stored, so you can query for any specific data you want and get it in the format needed.

[0]: http://uxwizz.com/


What I mean by this is that you've got a number of out-of the box graph types, with their own limitations. You can't access the code to actually change them.

Say you wanted to build Stripes new analytics [1] you'd need to build those yourself with all the subcomponents and layout within each component to have your own style and native feel. The percentage increase subcomponent alone for example will have a bunch of it's own properties (colour, size, shading, edges, race conditions, position within parent component, etc.) AND will have a specific data request to pull it back.

So I guess the question is, does it matter if it looks like your platform or not?



> does it matter if it looks like your platform or not?

Matter for whom? I guess the main question is who is viewing those graphs and if those people care about how they look or just the information in it.


I think you might have the term of art wrong - it sounds like you're looking for a charting library, rather than an analytics tool? (most folks assume analytics in the sense of product analytics, like https://plausible.io/ or https://amplitude.com/)


Correct - an analytics tool wouldn't solve for this need. I'm interested in finding a better solution to how to build analytics experiences in your own app for your customers (whether that's a simple dashboard or an interactive experience)

Do you think a charting library is enough of a solution? As I understand you would still be required to do all the heavy lifting I mentioned above of building analytics from scratch, save for giving you a head start on the components themselves - right?




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: