PageSense React Native — SDK Customisation

PageSense React Native — SDK Customisation

Overview  

The PageSense SDK provides configuration options that can be set during initialisation to control logging behaviour and how frequently the SDK fetches updated project settings. These options are configured in the native modules and apply to both Android and iOS.

Polling Interval  

The polling interval controls how frequently the SDK fetches updated project settings from the PageSense server. This determines how quickly experiment and goal configuration changes are reflected in the application without requiring a restart.

Default Behaviour

If no polling interval is set, the SDK uses its built-in default. Setting a custom interval overrides this default.

Configuration

The polling interval is set in minutes on the PageSenseSDKOptions object before the SDK is initialised.

Android (Kotlin)

kotlin
val pageSenseSDKOptions = PageSenseSDKOptions()
pageSenseSDKOptions.pollingInterval = 5 // Fetch updated settings every 5 minutes
iOS (Swift)
swift
let pageSenseSDKOptions = PageSenseSDKOptions()
pageSenseSDKOptions.pollingInterval = 5 // Fetch updated settings every 5 minutes

Notes

  • The polling interval value is in minutes.
  • Setting a lower interval means the SDK fetches updates more frequently, which keeps experiment configuration more current but increases network activity.
  • Setting a higher interval reduces network activity but means configuration changes take longer to reflect in the application.

Log Level  

The log level controls the verbosity of the PageSense SDK logs. Setting an appropriate log level helps with debugging during development and reduces noise in production.

Available Log Levels

Log Level
Description
TRACE
Most verbose. Logs all SDK activity including internal state transitions. Use only for deep debugging.
DEBUG
Logs detailed diagnostic information useful during development and integration. Recommended for development builds.
INFO
Logs general operational messages confirming the SDK is working as expected.
WARN
Logs potentially problematic situations that do not prevent the SDK from functioning.
ERROR
Logs error events that may cause the SDK to fail specific operations.
SEVERE
Logs only critical failures. Least verbose. Recommended for production builds.

Configuration

The log level is set on the PageSenseSDKOptions object before the SDK is initialised.

Android (Kotlin)

kotlin
val pageSenseSDKOptions = PageSenseSDKOptions()
pageSenseSDKOptions.logLevel = LogLevel.DEBUG

iOS (Swift)

swift
let pageSenseSDKOptions = PageSenseSDKOptions()
pageSenseSDKOptions.logLevel = .DEBUG

Notes

  • Use DEBUG during development to get detailed logs that help verify experiment activation, variation assignment, and goal tracking.
  • Use SEVERE or ERROR in production to minimise log output.
  • Log level does not affect SDK functionality — only what is written to the log output.

Applying SDK Options During Initialisation  

Both pollingInterval and logLevel are set on the PageSenseSDKOptions object, which is passed to the SDK initialisation call. The configuration applies for the lifetime of the PageSenseClient instance.

Android (Kotlin) 

  1. kotlin
  2. val pageSenseSDKOptions = PageSenseSDKOptions()
  3. pageSenseSDKOptions.logLevel = LogLevel.DEBUG
  4. pageSenseSDKOptions.pollingInterval = 5
  5. PageSenseClientBuilder.createNewPageSenseClient(
  6.     accountId,
  7.     sdkKey,
  8.     projectName,
  9.     pageSenseSDKOptions,
  10.     object : ProjectSettingsCallBack {
  11.         override fun onFailure(message: String?, code: Int?) {
  12.             println("SDK initialization failed: $message")
  13.             promise.resolve(false)
  14.         }
  15.         override fun onSuccess(data: PageSenseClient?) {
  16.             if (data != null) {
  17.                 client = data
  18.                 isInitialized = true
  19.                 println("SDK initialized successfully")
  20.                 promise.resolve(true)
  21.             } else {
  22.                 promise.resolve(false)
  23.             }
  24.         }
  25.     }
  26. )
iOS (Swift) 
  1. swift
  2. let pageSenseSDKOptions = PageSenseSDKOptions()
  3. pageSenseSDKOptions.logLevel = .DEBUG
  4. pageSenseSDKOptions.pollingInterval = 5
  5. PageSense.shared.createNewPageSenseClient(
  6.     sdkAccountIDForDC: accountId,
  7.     sdkKey: sdkKey,
  8.     projectname: projectName,
  9.     sdkOptions: pageSenseSDKOptions
  10. ) { pagesenseclient in
  11.     guard let client = pagesenseclient else {
  12.         print("PageSenseClient initialization failed")
  13.         resolve(false)
  14.         return
  15.     }
  16.     self.client = client
  17.     self.isInitialized = true
  18.     print("PageSenseClient initialized successfully")
  19.     resolve(true)
  20. }

Best Practices  

  • Set logLevel to DEBUG during development and integration to help diagnose issues with experiment activation, variation assignment, and goal tracking.
  • Set logLevel to SEVERE or ERROR before releasing to production to avoid excessive logging.
  • Set a polling interval that balances the freshness of experiment configuration against acceptable network activity for your application.
  • PageSenseSDKOptions must be configured before calling the initialisation function. Changes to the options after initialisation will have no effect.



We’ve designed this documentation to guide you every step of the way. If you need further assistance or have any questions, don’t hesitate to contact us at support@zohopagesense.com - we’re always here to help!

        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

                                  Zoho FSM Video Tutorials


                                        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

                                                                                                                                    • PageSense React Native — SDK Functions Reference

                                                                                                                                      Overview This document covers the JavaScript wrapper (PageSenseSDKWrapper.js) which is shared across both the Android and iOS React Native integrations. The wrapper provides a unified JavaScript interface for interacting with the PageSense SDK ...
                                                                                                                                    • PageSense Android SDK — React Native Bridge Integration Guide

                                                                                                                                      Overview This guide explains how to integrate the PageSense Android SDK into a React Native application using the React Native Native Bridge. The bridge enables React Native JavaScript code to invoke Android SDK functions and leverage FullStack ...
                                                                                                                                    • PageSense iOS SDK — React Native Bridge Integration Guide

                                                                                                                                      Overview This guide explains how to integrate the PageSense iOS SDK into a React Native application using the React Native Native Bridge. The bridge enables React Native JavaScript code to invoke iOS SDK functions and leverage FullStack ...
                                                                                                                                    • Release Notes — PageSense React Native Bridge

                                                                                                                                      Overview This release updates the PageSense React Native Bridge for Android and iOS with support for Revenue Goal tracking. The update introduces PageSenseUserContext and Goal Properties, providing a cleaner and more extensible API for passing user ...
                                                                                                                                    • SDK Customisation

                                                                                                                                      All SDK configuration goes through PageSenseSDKOptions. Set your options before passing the object into createNewPageSenseClient(). Initialization with custom options swift import PageSenseFramework let sdkOptions = PageSenseSDKOptions() ...
                                                                                                                                      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