To start, I'll say what party town is, in a nutshell: it's a tool to get some of your execution out of the main thread and into a worker.
It's doing that by communicating between the worker and the main thread, which will primarily execute DOM updates.
More in-depth, this concept works by you marking the scripts as `not javascript` then those scripts are forwarded to the worker. If those scripts are external, they must be passed through a proxy that will get around CORS.
Now most common use for PartyTown is for analytics scripts because they are heavy and can negatively affect performance; even the improved version of google tag manager has a large footprint. In fact, it could easily be the case that will cut 2-4% of your score. Now for that alone, and if you want to provide your user the highest amount of privacy, I feel that analytics should not be used.
But it may well be the case that you might need to use them for two main reasons; first, you see that data as absolutely critical, or second case which is mostly the case for me, you require that data by other services for gaining access to services that are otherwise not accessible.
Check out the whole article at: