Displaying Country and Device Data
Today I'll display the country and device data and hopefully wrap up the Stats feature.
I added the simplest possible display. This is what it looks like in prod.
Just as I was testing this, I realized I'm calculating the device info on the client for no reason. I could easily be doing it on the server using this library, as I already have the user agent. I'll definitely change that in the future.
I also need to start thinking about publishing the snippet somewhere so I can version and distribute it more easily and add to all of my websites. I need to research the different approaches. Ideally I would distribute it using CDN and have the users just reference it, so they don't have to deal with updates. It would also make things easier for me.
This is probably a good time to think about setting up the landing page. If anything, just to test out goal tracking (the next feature I'll be building)