sweepai-dev / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and a/b testing that you can self-host.
https://posthog.com
Other
0 stars 0 forks source link

[DRAFT] Add `page` function to all libraries #4

Closed sweep-ai[bot] closed 1 year ago

sweep-ai[bot] commented 1 year ago

Description

This PR adds a page function to all PostHog libraries in different languages. The page function simplifies the process of capturing pageviews by allowing users to call posthog.page('https://...') instead of the current, more verbose method. The page function internally calls the capture function with '$pageview' as the event and the provided URL as the '$current_url' property.

Changes Made

Testing

Related Issue

Closes #[issue_number]

Fixes #2.

To checkout this PR branch, run the following command in your terminal:

git checkout sweep/add-page-function