How to use Amplitude
Advices and “must-know” things regarding Amplitude usage.
Table of contents
Overview
A few words about Amplitude vs Google Analytics
When your want to perform Analytics in any app, people usually go for Google Analytics. We don’t.
GA is too limited, and huge, with tons of useless stuff. We’ve used it, and we really don’t recommend it for any SPA, especially when playing with universal app because it just sucks.
It’s very hard to configure GA with universal apps, you’ll end up with wrong analytics insights due to event multi triggers (SSR + CSR). It was designed and built for another world. Not for SPA or CSR!
- Our opinion
Instead, we use (and recommend) Amplitude. The world of analytics is huge, and isn’t cheap.
Amplitude allows tracking events and users behaviour, who are two very different things, even if events are related to users.
It’s simply the best one we’ve worked with since 2018.
It’s much more flexible than Google Analytics. Also, it plays much better with isomorphic apps and SPA.
If you want fine-grained control over the data you want to collect, it’s the perfect tool for the job.
Also, it provides a really great react package.
A note about Amplitude’s pricing
Amplitude offers a free plan that allows 10 million events per months ($identity
events aren’t counted towards events
, they’re free).
Then, the cheapest plan is Growth
, that starts around $48k/year (yup, it’s a huge gap)
If you want to benefit from the Growth plan for free, know that it’s possible (but limited to 1 years), through their startup Scholarship. They offer Scholarship for non-profit organisation too.
But, a word of caution here, even if you benefit from the scholarship, make sure your business doesn’t rely on Growth features when your Scholarship ends.
They told us then always find a way to provide Amplitude at an acceptable price for non-profit, but we don’t know that for sure yet.
Anyway, Amplitude is one of the best out there for Analytics.
If the free plan is enough for your needs, or if you can afford paid plans then don’t hesitate. Also, their react integration is really good, even though it’s not officially maintained and could use some love. (they told us they plan of maintaining it better)
Known limitations
Amplitude doesn’t provide any backend-compatible API.It’s not an issue for NRN, and avoids sending multiple events due to SSR/CSR, but it could be a limitation depending on your business needs.See https://github.com/amplitude/Amplitude-JavaScript/issues/164- They released
Amplitude-Node
since then. We haven’t tried it and it’s not used by NRN.
- They released
Dependencies
Amplitude is used to collect usage metrics (analytics) of the application.
Amplitude is used only on the frontend part of the application. It is composed of two parts:
@amplitude/react-amplitude
: React components easy to use, see their blog post.amplitude-js
: The JS SDK, only compatible from the browser. (They’re working on making it compatible with SSR)
See the documentation example at react-amplitude to understand how it’s meant to be used. We only use react-amplitude
to manipulate events.
Chrome developer debug tool
The amplitude team has released a Chrome plugin to see the events from the browser.
It is a must-have when working with Amplitude. It’s very simple to use and quite helpful.
Resources
- https://amplitude.com/
- https://developers.amplitude.com/
- https://amplitude.com/blog/category/inside-amplitude
- https://help.amplitude.com/hc/en-us