Track Goal

Track Goal

The Track Goal API is used to record conversion events for a Full Stack A/B test experiment. A goal represents a meaningful action completed by a user, such as a signup, purchase, or feature usage.

Goal tracking helps PageSense measure experiment performance and determine which variation is driving better outcomes.

What this allows you to do  

By tracking goals, you can:

  • Measure conversions for Full Stack experiments

  • Compare performance across experiment variations

  • Identify which variation drives better results

  • Generate accurate experiment reports in PageSense

When to track a goal  

You should track a goal:

  • After the experiment has been activated for the user

  • When the user completes the action defined as a goal

  • At the exact point where the conversion occurs

Goal tracking should not be triggered before experiment activation.

Tracking a goal with user attributes  

User attributes can be passed while tracking a goal to ensure audience conditions are evaluated correctly and data is recorded accurately.

KOTLIN

  1. import com.zoho.pagesense.android.abtesting.PageSenseClient
  2. // Create a map to hold user attributes
  3. val userAttributes = mutableMapOf(
  4. "DeviceType" to "Phone",
  5. "OS" to "Android",
  6. "OSVersion" to "14",
  7. "DeviceModel" to "Pixel 8 Pro"
  8. )
  9. // Track the goal for the Full Stack A/B Test experiment
  10. pageSenseClient.trackGoal(
  11. experimentName,
  12. userId,
  13. goalName,
  14. userAttributes
  15. )

JAVA

  1. import com.zoho.pagesense.android.abtesting.PageSenseClient;
  2. import java.util.HashMap
  3. // Create a map to hold user attributes
  4. HashMap<String, String> userAttributes = new HashMap<>();
  5. userAttributes.put("DeviceType", "Phone");
  6. userAttributes.put("OS", "Android");
  7. userAttributes.put("OSVersion", "14");
  8. userAttributes.put("DeviceModel", "Pixel 8 Pro");
  9. // Track the goal for the Full Stack A/B Test experiment
  10. pageSenseClient.trackGoal(
  11. experimentName,
  12. userId,
  13. goalName,
  14. userAttributes
  15. ); 

Tracking a goal without user attributes  

If user attributes are not available, you can track a goal using only the experiment name, user ID, and goal name.

Only experiments targeting All Visitors will qualify in this case.

JAVA & KOTLIN

  1. // Track the goal without user attributes
  2. pageSenseClient.trackGoal(
  3. experimentName,
  4. userId,
  5. goalName
  6. );

Important notes  

  • Goals are tracked only if the user qualifies for the experiment

  • If the user is not part of the experiment, the goal call is ignored

  • Tracking the same goal multiple times may result in duplicate conversions

  • Always ensure the goal name matches the one configured in PageSense

  • This method does not return success or failure. It silently ignores calls if the user does not qualify for the experiment.

Best practices  

  • Track goals immediately after the conversion action

  • Use stable user identifiers

  • Avoid tracking goals on app launch or screen load

  • Keep goal names consistent and meaningful

What happens after tracking a goal  

Once a goal is tracked:

  • The conversion is recorded against the assigned variation

  • Data is sent to PageSense for reporting and analysis

  • Experiment reports update with conversion metrics

 



        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

                                                                                                                                • Full Stack - Environment

                                                                                                                                  Environment The Environment section under Full Stack settings allows you to configure environments for your server-side or full stack applications in Zoho PageSense. Environments help you manage and track experimentation across different stages of ...
                                                                                                                                • 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, ...
                                                                                                                                • Track Goal

                                                                                                                                  The trackGoal() method is used to record goal conversions for Full Stack A/B Testing experiments in PageSense. It records the conversion events in PageSense only for the users who qualify for the experiment. This API can be invoked with or without ...
                                                                                                                                • Activate Experiment

                                                                                                                                  The Activate Experiment step evaluates whether a user qualifies for a Full Stack A/B test and assigns a variation accordingly. This is the point where your application decides which experience a user should see. The experiment activation logic runs ...
                                                                                                                                • 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. ...
                                                                                                                                  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