
Partytown
Moves heavy third-party scripts like analytics off the main thread into a web worker.
- Stars
- 13.8k
- Forks
- 460
- Licence
- MIT
- Language
- TypeScript
- Last update
- 7 days ago
- Type
- Library
What it is
Partytown is a lazy-loaded JavaScript library that relocates resource-intensive third-party scripts, such as analytics or marketing tags, into a web worker. A web worker runs in a separate background thread, so these scripts compete less with your own code for the browser's main thread. The stated goal is to keep the main thread free for your site's code and speed up page responsiveness.
- Offload a Google Analytics or similar tracking script to a web worker
- Reduce main-thread JavaScript on a content or marketing site
- Test whether moving third-party scripts off the main thread improves your page performance
Great for
- Site owners whose pages are slowed by analytics or marketing third-party scripts
- Teams tracking Core Web Vitals or Lighthouse scores who want to reduce main-thread work
- Developers using a framework that has a Partytown integration (the README links an integrations page)
Not ideal for
- Sites whose third-party scripts must run on the main thread, since the README says Partytown is not guaranteed to work in every scenario
- Teams that need a guaranteed, fully supported setup without checking the FAQ and trade-offs pages first
How to get it
- 1
Install with a package manager
Clone the repository
git clone https://github.com/QwikDev/partytown - 2
Run it
- Read the Getting Started guide at partytown.qwik.dev/getting-started
- Choose the integration that matches your framework or site setup from the integrations page
- Configure which scripts to relocate using the configuration page
- Test the page and compare performance before and after
- 3
Get the most out of it
- Review the FAQ and Trade-Off pages before rolling out to production
- Use the integrations page to find a setup matching your framework
- Measure results with Lighthouse or Core Web Vitals before and after
Downloads
Strengths
- Targets a clear problem: third-party scripts blocking the main thread
- Open source under the MIT license with a large community (about 13.8k stars)
- Documented getting-started, integrations, and configuration guides
Trade-offs
- The README explicitly says it is not guaranteed to work in every scenario, so behavior needs testing per site
- Its trade-offs are documented separately, meaning some limitations are not visible in the README itself
- Latest release is v1.0.2 and the README is truncated, so the full maturity picture is unclear from this source
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| partytown (this) | 13.8k | Library | intermediate | 7 days ago | Site owners whose pages are slowed by analytics or marketing third-party scripts |
| uPlot | 10.6k | Library | intermediate | 6 days ago | Web developers who need a fast chart for large time series data |
| preact | 39k | Library | intermediate | 4 days ago | Web developers who already know React and want a lighter library |
| solid | 36.2k | Library | intermediate | 4 days ago | Developers who want fine-grained control over what re-renders in a web UI |
| html2canvas | 31.9k | Library | beginner | 2.3 years ago | Front-end developers who want to let users save or export part of a page as an image |
| react-virtualized | 27.1k | Library | intermediate | 5 days ago | React developers who need to display long lists of items |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.