How to add and execute a custom project JS code in Zoho PageSense?

Add a custom Project JS code in PageSense

Project Javascript (JS) is an advanced project setting available in PageSense that lets you create customized Javascript code without having to change your native website's code. This JS code will execute as soon as the PageSense script loads on your page.  Using this option, you can execute more advanced JS conditions in the experiments that run and depend on reusable variables, targeting conditions, and API calls, with ease and efficiency. 

Common use cases for Project JavaScript include:
  1. Tracking unique custom events, such as newsletter subscription and scroll depth of users.
  2. Reusing custom modules, such as promotional banners and notification windows across multiple experiments.
  3. Running experiments on single-page apps that happen without reloading the page.
  4. Managing multiple analytics integrations on the same page.
  5. Targeting more than one experiment to the same audience.

To add your own Project JS code in PageSense:

1. Click Project Settings at the top right-corner and select Project JS.
2.
 
Enter the custom Javascript that you want to add to your website within the text box and click Save.
For example, say you want to reuse the same 'coupon code' banner in multiple A/B experiment pages within your Project. In this case, you can write a Project JS code (as shown in the image below) that calls the function "window.showBanner()" in the 'Global or Variation JS code' of the A/B experiments in which you want to display the banner.



    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









                                            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

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      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 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

                                                                                                              • Install the PageSense code snippet on Shopify

                                                                                                                If you are using Shopify, an eCommerce platform used to set up your online store and sell products worldwide, then you can effortlessly add the PageSense snippet code on your Shopify websites and start tracking visitor data with a few simple clicks, ...
                                                                                                              • Make advanced changes to the variation using JS/CSS editor

                                                                                                                Apart from making changes manually to the design and content on your variation page, you can also directly write your own custom Javascript and CSS code changes using the PageSense visual editor. This option will provide you the freedom to quickly ...
                                                                                                              • Install the PageSense code snippet on Wix

                                                                                                                If you're using Wix, cloud-based software to build and customize your online business website, you can add the PageSense snippet code on your Wix sites to start quickly start tracking and understanding all of your website data with ease. This ...
                                                                                                              • Integrate Mixpanel with Zoho PageSense

                                                                                                                If you are using Mixpanel to monitor your website's traffic and get more visibility on how customers interact with your site pages, then integrating with PageSense can help you extract powerful insights about your A/B and Split URL experiment data. ...
                                                                                                              • Install the PageSense code snippet using Tag Manager

                                                                                                                If you're using Google Tag Manager (GTM) to integrate with Zoho PageSense, you can use the PageSense tag available in the tag list to quickly install the code snippet on your website instead of manually adding them every time. Once you add the tag, ...
                                                                                                                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