taverasmisael / taverasmisael.com

My personal website and blog. Build with an hybrid Astro SSR, SolidJS and TailwindCSS. Support for internazionalization and more.
https://taverasmisael.com
2 stars 0 forks source link

feat: add Partytown (again) #28

Closed taverasmisael closed 1 year ago

taverasmisael commented 1 year ago

The first time I added, I didn't understand the mechanics and essential things like you can't use external libs (because it's a WebWorker and CORS and whatnot).

Then I had also to add a (thankfully supported) middleware to redirect the call to Google services. I also can host the script myself, but I don't want to use an outdated version; I have no idea how often they change. But if this becomes an issue, either on the pricing of running the middleware or any other, we can revisit that option.

If this fails, I might consider using GA on the server or removing it altogether. The trigger that motivated me to revisit Partytown after removing it earlier was that adding the gTags scripts hurts two key metrics: LCP and Blocking time, while adding a bunch of unused JS.

Lighthouse Score down to 89 from 99

A 10 points loss on mobile performance due to gAnalytics.

So far, this is running great on the staging environment. I want to monitor it for at least a day.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
taverasmisael-com ✅ Ready (Inspect) Visit Preview Jun 22, 2023 1:00am