Installation of PHP SDK

Installation of PHP SDK

The PageSense PHP SDK empowers developers to integrate, run, and analyze Full Stack A/B tests directly from their PHP applications. It offers a simple, secure, and reliable way to connect your PHP applications to the PageSense’s experimentation platform, allowing you to evaluate variations, personalize user experiences, and track conversions in real time.

What the PHP SDK allows you to do  

  • Add A/B Test experimentation to your PHP application with minimal setup.

  • Handle all the communication with the PageSense REST APIs securely using HTTPS.

  • Automatically fetch and cache project settings to keep the experiments in sync.

  • Capture and send visit and goal events (engagements, conversions, interactions) instantly.

  • Store and use the user attributes for audience targeting and report segmentation.

How it works  

PageSense PHP SDK acts as a lightweight communication layer between your PHP application and PageSense’s FullStack experimentation platform. Once initialized, it can:

  • Fetch all active experiments associated with your project.

  • Determine which variation should be served for each user or session.

  • Track visits and conversions and send the real-time metrics back to PageSense for analysis.

This ensures that your server logic stays consistent with your PageSense experiment setup and that experiment results reflect real-world usage accurately.

Installation  

PageSense PHP SDK can be installed in your PHP application via Composer, the standard dependency manager for PHP.
  1. Install Composer

a. To install the Composer in Windows machine, run the following PowerShell commands.

  1. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  2. php composer-setup.php --install-dir=C:\composer --filename=composer.phar
  3. php -r "unlink('composer-setup.php');"

b. To install the Composer in Mac/Linux machine, run the following commands in Terminal.

  1. curl -sS https://getcomposer.org/installer -o composer-setup.php
  2. sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
  3. rm composer-setup.php
  1. Install PageSense PHP SDK

Run the following command in your Project root folder to install the PageSense PHP SDK

  1. composer require zoho/zpagesense-php-sdk

If you prefer to integrate the PageSense PHP SDK manually, you can download the package from the link and include it in your application -: PHP SDK.


Requirements  

  • PHP 8.1 or above

 

We hope this documentation helps make the process easy for you. Please feel free to reach out to us anytime by dropping an email to support@zohopagesense.com if you need more explanation or have any questions.


      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              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.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsEnterpriseOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceAccessible Forms
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit

                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic Forms
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsFormstack alternativeEncrypted Forms

                              Wufoo alternativeSecure Forms

                              TypeformWCAG


                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now




                                                            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.




                                                                Manage your brands on social media


                                                                  • Desk Community Learning Series


                                                                  • Digest


                                                                  • Functions


                                                                  • Meetups


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner


                                                                  • Word of the Day


                                                                  • Ask the Experts


                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now








                                                                                                                            • Related Articles

                                                                                                                            • Initialization of PHP SDK

                                                                                                                              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, ...
                                                                                                                            • SDK Customization

                                                                                                                              PageSense SDK provides a flexible configuration model that allows developers to adapt its behavior to suit the needs of their application. While the SDK can be used with minimal setup using the default configuration, applications with stricter ...
                                                                                                                            • Installation of Java SDK

                                                                                                                              The PageSense JAVA SDK empowers developers to integrate, conduct A/B testing, and personalise user experiences within JAVA applications. PageSense JAVA SDK offers a simple and reliable way to integrate FullStack A/B Testing into your JAVA-based ...
                                                                                                                            • Installation of C#.NET SDK

                                                                                                                              Overview: The PageSense C# SDK empowers developers to integrate, conduct A/B testing, and personalize user experiences within C#.NET applications. PageSense C# SDK offers a simple and reliable way to integrate FullStack A/B Testing into your ...
                                                                                                                            • SDK Customization

                                                                                                                              Overview: SDK customization involves tailoring a Software Development Kit (SDK) to meet the unique needs of your application or development environment. An SDK typically includes tools, libraries, documentation, and code samples to assist developers ...
                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources