Initialization of Java SDK

Initialization of Java SDK

PageSenseClient is the interface provided by the PageSense Java SDK library to run the FullStack A/B Test experiments for the users. To run the FullStack experiment for the user, the PageSenseClient should be first initialised with the Project Setting details. The Project Setting details provide the information about the list of the FullStack experiments the PageSenseClient can execute and also explains how the experimentation should be carried out.

Initialization of PageSense JAVA SDK comprises of two steps:

2.1 Getting the Project Settings for PageSenseClient
2.2 Creating the PageSenseClient instance

2.1 Get the Project Settings for PageSenseClient:

ProjectSettings provides the details of list of the FullStack Experiments to be run by the PageSenseClient. and the current state of each of the experiments. Project Settings can be obtained from the PageSense server using the getProjectSettings API.

This API should be invoked by passing the following parameters:
NAME
TYPE
DESCRIPTION
accountId
String
A unique PageSense account ID for User.
sdkKey
String
Unique Key that corresponds to the SDK Environment.
You can get this key from the Environment Tab under the Project Settings in the FullStack page.
projectName
String
Name of the Project.

Get Project Setting Details

Add the following code to your application to get the Project Setting file for your PageSense account.

 

import com.zoho.pagesense.PageSenseClient;

import com.zoho.pagesense.PageSenseClientBuilder;

 

  // Get the Project Settings

  String projectSettings = PageSenseClientBuilder.getProjectSettings("accountId" “sdkKey”, “projectName”);

Info: This function will return the Project Settings if present in the Stringified JSON format. If there are no project settings available, this function will return null.

2.2  Creating the PageSenseClient instance

Once you receive the ProjectSettings, the next setup is to initialise the PageSenseClient with the Project Setting and create an instance of the PageSenseClient. You can initialise the PageSenseClient using the following code:

PageSenseClient pageSenseClient = PageSenseClientBuilder.getBuilder(projectSettings).buildClient();

If Project Settings have valid details, it will initialise the PageSenseClient with the details of the project and return the PageSenseClient instance. If the Project details are not valid or any error occurred while initialising the PageSenseClient, this API will return null.

Note: Please make sure you implement proper error handling measures when the PageSenseClient is initialized as null.

Example code:

  import com.zoho.pagesense.PageSenseClient;

  import com.zoho.pagesense.PageSenseClientBuilder;

  // Get the Project Settings

  String projectSettings = PageSenseClientBuilder.getProjectSettings("Zylker", "Nmvqoqp2Pr2gtKA", "Zylker Marketing");

  // Create the PageSense Client Instance

PageSenseClient pageSenseClient = PageSenseClientBuilder.getBuilder(projectSettings).buildClient();

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

                                All-in-one knowledge management and training platform for your employees and customers.

                                            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 Android Full Stack SDK

                                                                                                                                After installing the PageSense Android Full Stack SDK, the next step is to initialize it with your project configuration. Initialization connects your app to PageSense and loads the Full Stack project settings required to run experiments. In Android, ...
                                                                                                                              • SDK Customization

                                                                                                                                The PageSense Android Full Stack SDK provides customization options that allow you to control how the SDK behaves inside your application. These options help you balance freshness of experiment configuration, logging verbosity, and operational ...
                                                                                                                              • Installation of Android SDK

                                                                                                                                The PageSense Android Full Stack SDK lets you run server-side A/B tests and track experiment outcomes directly from your Android application. Once installed, your app can participate in Full Stack experiments and start collecting core analytics data. ...
                                                                                                                              • 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 ...
                                                                                                                              • 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, ...
                                                                                                                                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