Install the PageSense Python SDK from PyPI using pip.
pip install zohopagesense-python-sdk
After installation, import the required SDK classes into your application.
from pagesense import (
PageSenseClient,
PageSenseClientBuilder,
PageSenseUserContext,
)
Verify the Installation
After installing the SDK, verify that it has been installed successfully by importing the required SDK classes.
from pagesense import PageSenseClient, PageSenseClientBuilder
print("PageSense SDK imported successfully"
If the import succeeds, the SDK has been installed correctly and is ready for use. If the import raises a ModuleNotFoundError, verify that the SDK has been installed into the correct Python environment. If you are using a virtual environment, ensure that it is activated before installing or importing the SDK.
Troubleshooting
If the SDK cannot be imported, verify that the package is installed in the active Python environment by running:
pip show zohopagesense-python-sdk
If the package is not found, reinstall the SDK or activate the correct virtual environment before running your application.
API Summary
The following APIs are exposed by the PageSense Python SDK.
API | Returns | Description |
Activate Experiment | str | Activates an experiment and returns the assigned variation name. |
Get Variation Name | str | Returns the assigned variation without activating the experiment. |
Track Goal without Goal properties | None | Tracks a project-level goal conversion. |
Track Goal with Goal properties | None | Tracks a goal conversion with goal properties, such as revenue. |