Python
Best Practices
Following these recommendations will help ensure optimal SDK performance, accurate experiment evaluation, and reliable goal tracking. SDK Initialization Initialize the SDK once during application startup. Reuse a single PageSenseClient instance ...
Custom User Storage
Overview By default, the SDK maintains visitor assignments in memory. For production applications, you can provide a custom storage implementation using add_custom_storage() to persist visitor assignments across application restarts. Persistent ...
Polling Interval
Overview During initialization, the SDK downloads the latest project configuration from the PageSense server and stores it in memory. To keep the project configuration up to date, the SDK periodically synchronises the in-memory configuration with the ...
Log Level
Overview The PageSense Python SDK includes a built-in logging framework to help monitor SDK initialization, project synchronisation, experiment evaluation, goal tracking, and error conditions. By default, the SDK logs messages at the INFO level. You ...
SDK Configuration
Overview The PageSense Python SDK provides the PageSenseSDKOptions class to customize the SDK's behaviour during initialization. All configuration options are optional. If no configuration is provided, the SDK uses its default settings. The ...
Track Revenue Goal
Overview The PageSense Python SDK supports revenue goal tracking through the Track Goal API by allowing you to pass additional goal information using the goal_properties parameter. Revenue tracking enables you to measure the monetary impact of your ...
Track Goal
Overview The Track Goal API records a goal conversion for the specified visitor. Every goal tracked through this API is recorded at the project level. In addition, if the tracked goal is associated with one or more active FullStack A/B Test ...
Get Variation Name
Overview The Get Variation Name API evaluates the specified experiment and returns the variation assigned to the visitor without recording an experiment impression. This API is useful when the application needs to determine the assigned variation ...
Activate Experiment
Overview The Activate Experiment API evaluates a visitor against the specified FullStack A/B Test experiment, assigns the visitor to a variation, records an experiment impression event in the PageSense server, and returns the assigned variation name. ...
GoalProperty
Overview GoalProperty defines additional information that can be associated with a goal conversion. It is used with the Track Goal API to provide metadata about the tracked goal. Currently, the Python SDK supports the following goal property: Goal ...
PageSenseUserContext
PageSenseUserContext represents a visitor participating in FullStack A/B Testing. It encapsulates the visitor identifier along with optional custom attributes that are used during experiment evaluation, audience targeting, variation assignment, and ...
SDK Initialization
The PageSense Python SDK is initialised using the PageSenseClientBuilder class. During initialization, the SDK downloads the latest project configuration from the PageSense server and creates a PageSenseClient instance that can be used to evaluate ...
Installating the SDK
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, ...
Introduction to Python SDK
The PageSense Python SDK enables developers to integrate Zoho PageSense FullStack A/B Testing into Python applications. It allows server-side applications to evaluate experiments, retrieve variation assignments, and track goal conversions without ...