This PR adds a page function to all libraries, allowing users to easily capture pageviews without having to manually specify the event name and properties each time.
Changes Made
Added a page function to the frontend/src/toolbar/posthog.ts file that internally calls posthog.capture with the event name $pageview and the property $current_url.
Added tests for the page function in the frontend/src/toolbar/posthog.ts file.
Added a page function to the posthog/demo/matrix/models.py file that internally calls posthog.capture with the event name $pageview and the property $current_url.
Added tests for the page function in the posthog/demo/matrix/models.py file.
Added tests for the page function in the ee/clickhouse/models/test/test_action.py file.
Updated the documentation in the README.md file to include examples of how to use the page function in each library.
Testing
Tested the page function in each library to ensure it works as expected.
Description
This PR adds a
page
function to all libraries, allowing users to easily capture pageviews without having to manually specify the event name and properties each time.Changes Made
page
function to thefrontend/src/toolbar/posthog.ts
file that internally callsposthog.capture
with the event name$pageview
and the property$current_url
.page
function in thefrontend/src/toolbar/posthog.ts
file.page
function to theposthog/demo/matrix/models.py
file that internally callsposthog.capture
with the event name$pageview
and the property$current_url
.page
function in theposthog/demo/matrix/models.py
file.page
function in theee/clickhouse/models/test/test_action.py
file.README.md
file to include examples of how to use thepage
function in each library.Testing
page
function in each library to ensure it works as expected.Checklist
page
function to all librariespage
functionREADME.md
filepage
function in each libraryRelated Issue
Add
page
function to all librariesFixes #2.
To checkout this PR branch, run the following command in your terminal: