dojap
Do you use Google Analytics with Phoenix?
Especially for personal projects where you don’t need to show Google Analytics numbers to your company and stuff, I really think that for tracking users activity, what they click and when etc. Pheonix LiveView is nice.
For example, more and more people are using adblockers, so, the Google Analytics numbers are screwed, which is a non-issue with a server side solution.
But my concern is about performance. Logging every action in the database could be a lot after time and with a lot of users. What is your experience when it comes to performance and logging every action/click/pageload of users, or at least, registered users?
Or should I use some external open source server side solution?
Most Liked
wmnnd
If you don’t have millions of users every month, a naive approach with a regular Postgres or MariaDB instance will probably handle your logs just fine. If you don’t care about permanently persisting these logs, you could also build something using ETS tables.
If you want something more sophisticated built in Elixir, you could give Plausible a try ![]()
edisonywh
Dashbit has some articles on building a homegrown solution - Homemade analytics with Ecto and Elixir - Dashbit Blog, though I just use Plausible (they’re built in Elixir so I’m happy to support!)
c4710n
Google Analytics not only can be used from client-side, but also from server-side.
Check out Server-Side Tracking in Google Tag Manager. In this way, you don’t store any action in your database, but the online service, just like using client-side tracking.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









