The PageSenseClient class is the main interface provided by the PageSense PHP SDK to run Full Stack A/B Testing experiments for the users. Before serving variations or tracking goals, the client must be initialized with your project’s configuration, known as the Project Settings.
Initialization of the PageSense PHP SDK involves two steps:
Fetching the Project Settings from the PageSense server.
Creating a PageSenseClient instance using those settings.
Calling the Method
Add the following code to your application to get the Project Setting file for your PageSense account.
Parameter | Type | Description |
accountId | string | Your unique PageSense account ID with Data Center Code. |
sdkKey | string | Unique key corresponding to your SDK environment. Available under the Environment tab in your Full Stack project settings. |
projectName | string | Name of your Full Stack project. |

Once you’ve fetched the Project Settings, you can initialize the PageSenseClient. The client uses these settings to determine which experiments and variations apply to each user session.
Calling the Method
After Initialization
Your PageSenseClient instance is now ready to:
Activate experiments
Fetch variation names
Track goals and conversions
Manage project-level settings
You can create a single instance of the PageSenseClient during your application startup and use it for all the users using your application to run the A/B Test, deliver the variations and track the goal conversions and send the tracking details to PageSense.
Note: Implement robust error-handling procedures to safely manage cases where the PageSenseClient fails to initialize and results in a null instance. Your application should handle this condition gracefully to avoid unexpected runtime errors.Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.