PostHog / posthog-js-lite

Reimplementation of posthog-js to be as light and modular as possible.
https://posthog.com/docs/libraries
MIT License
69 stars 36 forks source link

Network requests support for Android #310

Open marandaneto opened 4 days ago

marandaneto commented 4 days ago

Description

Relates to https://github.com/PostHog/posthog.com/pull/9927/files iOS can swizzle the URLSession requests. Android uses the Java APIs and we don't have access to the instance so we could intercept and log things. An alternative is bytecode manipulation. Another option is to instead write a fetch wrapper so we capture the info directly on the JS code.