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
Added page function to the JavaScript library (posthog-js)
Added page function to the Python library (posthog-python)
Added page function to the Node library (posthog-node)
Added page function to the Ruby library (posthog-ruby)
Added page function to the PHP library (posthog-php)
Added page function to the Go library (posthog-go)
Testing
Manually tested the page function in each library by calling posthog.page('https://...') and verifying that the event is captured correctly.
Related Issue
Closes #[issue_number]
Fixes #2.
To checkout this PR branch, run the following command in your terminal:
Description
This PR adds a
page
function to all PostHog libraries in different languages. Thepage
function simplifies the process of capturing pageviews by allowing users to callposthog.page('https://...')
instead of the current, more verbose method. Thepage
function internally calls thecapture
function with '$pageview' as the event and the provided URL as the '$current_url' property.Changes Made
page
function to the JavaScript library (posthog-js
)page
function to the Python library (posthog-python
)page
function to the Node library (posthog-node
)page
function to the Ruby library (posthog-ruby
)page
function to the PHP library (posthog-php
)page
function to the Go library (posthog-go
)Testing
page
function in each library by callingposthog.page('https://...')
and verifying that the event is captured correctly.Related Issue
Closes #[issue_number]
Fixes #2.
To checkout this PR branch, run the following command in your terminal: