Real-time Product Analytics with LiveView by Basile Nouvellet | ElixirConf EU 2023

Code Sync: Real-time Product Analytics with LiveView by Basile Nouvellet | ElixirConf EU 2023

Comments welcome! View the code-sync and elixirconf-eu tags for more Code Sync and ElixirConf EU talks!

2 Likes

Hi! I just watched this video over the weekend and I went through the surf_marketplace code. It is really cool. Thanks for sharing it.

On thing I found is that it is simpler to use a Phoenix Tracker (Phoenix.Tracker — Phoenix.PubSub v2.1.3) to keep track of the LiveView pids. Then in the “analytics” page as per your project, use Phoenix.Tracker.list/2 to list the PIDs.

This has the added benefit of not needing the brittle pattern matching on the process initial caller and all that stuff. This can change. For example, if using Bandit instead of Cowboy. So by using Tracker we don’t need to list all processes and then try to find the LiveViews in that list.

Anyway, your github repo helped me a lot. Thanks again for this awesome talk :slight_smile: