It seems there are generally only two (imperfect) options for building analytics in your app:<p>- 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)<p>- 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.<p>Has anyone else been forced to select one of these two imperfect options?<p>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.<p>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.
Custom analytics, very barebone:<p>- A single “events” table in my DB (Postgres)<p>- A simple POST /track request with some conventions: a type (error or analytics), a name and a jsonb of data (with similar conventions).<p>- A couple of Postgres views for very specific “dashboards”: paying customers, referrers per week, etc…<p>- 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<p>- 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)<p>(In total I probably spent 10h building it, over the course of 4 years: very much worth it)
Related: <a href="https://news.ycombinator.com/item?id=35859937">https://news.ycombinator.com/item?id=35859937</a><p>From my answer[0] thereon:<p>> you might be "successful" doing what you're proposing (if you choose a tiny feature set, and discard everything else everyone asks you for)<p>> ...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 :)<p>-----------<p>[0] <a href="https://news.ycombinator.com/item?id=35860349">https://news.ycombinator.com/item?id=35860349</a>
I assume that by "limited components and styling" is about the stats displayed by the analytics dashboard?<p>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.<p>[0]: <a href="http://uxwizz.com/" rel="nofollow noreferrer">http://uxwizz.com/</a>
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 <a href="https://plausible.io/" rel="nofollow noreferrer">https://plausible.io/</a> or <a href="https://amplitude.com/" rel="nofollow noreferrer">https://amplitude.com/</a>)