This library is large
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 609
- Forks
- 343
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 302
Description
As it stands now, posthog-js v1.3.0 is about 52.4kb of minified code.

While nowhere near as bad as some of our competitors (mixpanel-browser is 95KB and segment's analytics.js is 187KB), this can still be improved upon.
Should we improve on this and with what priority? We've covered the low hanging fruit and the next step is to refactor and modernise the library's internals. This would greatly help writing proper tests as well.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Bundlephobia result for posthog-js@1.3.0 and the linked testing discussion in issue #50, then inspect the library internals to identify measurable size targets. Done requires an agreed priority and refactoring plan that reduces the minified bundle while supporting proper tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100