Release Notes — PageSense React Native Bridge

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 information and tracking goals with associated properties.
These additions are fully backward compatible. Existing integrations using the legacy SDK functions will continue to work without modification.

What's New  

PageSenseUserContext  
A new object that bundles userId and userAttributes into a single structured container. Instead of passing userId and userAttributes as separate arguments, the new SDK functions accept a single PageSenseUserContext instance.
Goal Properties  
A new mechanism that enables tracking goals along with associated properties such as Revenue values. Goal properties are passed as a key-value object from JavaScript. The native bridge maps each string key to its corresponding native type before invoking the SDK.
  • Android — Goal properties are accepted by the SDK as a HashMap<GoalProperty, String>, where GoalProperty is a constant defined in com.zoho.pagesense.android.abtesting.constants.
  • iOS — Goal properties are accepted by the SDK as [GoalProperty: String], where GoalProperty is an enum exposed by PageSenseFramework with lowercase raw values.
New SDK Functions  
The following context-based functions have been added to the JavaScript wrapper (PageSenseSDKWrapper.js) and to both the Android and iOS native bridge modules:

Function
Description
activateExperimentByContext(experimentName, userContext)
Activates a FullStack experiment using PageSenseUserContext and returns the variation assigned to the user.
getVariationNameByContext(experimentName, userContext)
Retrieves the variation assigned to a user using PageSenseUserContext without activating the experiment.
trackGoalByContext(goalName, userContext)
Tracks a goal using PageSenseUserContext without goal properties. Use this for FullStack Custom Event Goals.
trackGoalByContext(goalName, userContext, goalProperties)
Tracks a goal using PageSenseUserContext with goal properties. Use this for Revenue Goals.
Function Comparison  
Purpose
Old SDK Function
New SDK Function
Activate experiment
activateExperiment(experimentName, userId, userAttributes)
activateExperimentByContext(experimentName, userContext)
Get variation name
getVariationName(experimentName, userId, userAttributes)
getVariationNameByContext(experimentName, userContext)
Track goal (no properties)
trackGoal(experimentName, userId, goalName, userAttributes)
trackGoalByContext(goalName, userContext)
Track goal (with properties)
Not supported
trackGoalByContext(goalName, userContext, goalProperties)

Backward Compatibility  
The new context-based functions are additions to the existing SDK functions, not replacements. Both the old SDK functions and the new SDK functions are supported. Existing integrations will continue to work without modification.

Platform-Specific Changes  

Android  
  • Added PageSenseUserContext support in the Kotlin native module (PageSenseSDKModule.kt).
  • Added activateExperimentByContext, getVariationNameByContext, trackGoalByContext, and trackGoalWithPropertiesByContext to the Kotlin native module.
  • Added GoalProperty import from com.zoho.pagesense.android.abtesting.constants.
  • Added validateAndBuildUserContext and validateAndConvertGoalPropertiesNonEmpty private validation helpers.
  • No changes are required to PageSenseSDKPackage.kt or MainApplication.kt.
Required SDK Version Upgrade  
  1. To use Revenue Goal tracking, the PageSense Android SDK dependency must be upgraded to version 1.1.3 or later in android/app/build.gradle.
  2. gradle
  3. dependencies {
  4.     implementation("com.facebook.react:react-android")
  5.     implementation("com.zoho.pagesense:pagesense:1.1.3")
  6. }
After updating, perform a Gradle sync in Android Studio and rebuild the application.
iOS  
  • Added PageSenseUserContext support in the Swift native module (PageSenseSDKModule.swift).
  • Added activateExperimentByContext, getVariationNameByContext, trackGoalByContext, and trackGoalWithPropertiesByContext to the Swift native module.
  • Added corresponding RCT_EXTERN_METHOD declarations to the Objective-C bridge file (PageSenseSDKModule.m).
  • Added validateAndBuildUserContext and validateAndConvertGoalPropertiesNonEmpty private validation helpers.
  • Goal properties are mapped from JavaScript string keys to GoalProperty enum cases using GoalProperty(rawValue:).
JavaScript Wrapper  
  • Added GoalProperty constants object exported from PageSenseSDKWrapper.js.
  • Added activateExperimentByContext, getVariationNameByContext, and trackGoalByContext wrapper functions.
  • Added _validateUserContext and _validateGoalPropertiesNonEmpty private validation helpers.
  • The GoalProperty.REVENUE constant holds the string value "revenue", which maps to the native GoalProperty.REVENUE constant on Android and the GoalProperty.revenue enum case on iOS.

GoalProperty Reference  

JS Constant
String Value
Android Native Constant
iOS Native Enum Case
Purpose
GoalProperty.REVENUE
"revenue"
GoalProperty.REVENUE
GoalProperty.revenue
Revenue amount in cents, used for Revenue Goals


Notes  

  • Revenue values must be passed as a string in cents. For example, $100.50 should be passed as "10050".
  • When goalProperties is provided to trackGoalByContext, it must be a non-empty object. For goals without properties, omit the argument entirely.
  • For all new integrations, use the context-based SDK functions (activateExperimentByContext, getVariationNameByContext, trackGoalByContext). These represent the recommended approach for all future implementations.




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 ...
                                                                                                                                    • 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 ...
                                                                                                                                    • Declaring a winner in A/B test in PageSense

                                                                                                                                      Remember, A/B testing is not just about running tests and finding the winning variation for your web page, it is also about learning how different factors contributed to the win. Before implementing the highest winning design on your website, it's ...
                                                                                                                                      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