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.
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.
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.
So far, this is running great on the staging environment. I want to monitor it for at least a day.