Add a custom JS/CSS code in a/b test editor on Zoho PageSense | Help Guide

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 implement any changes to the style, attribute, or value of your choice throughout the variation. Zoho PageSense allows you to add the custom code in two ways: 

1. At the variation level: This adds your custom JS/CSS code to a particular variation instead of all variations in the A/B experiment.
2. At the experiment level: This adds your custom JS/CSS code to the entire test and all variations, including the original version, using the Global code editor. 

Important:
  • Use the JS(Javascript) code editor to make simple, standard changes to elements on the variation page such as move, delete, resize, change text or URL links.
    Example: Changing the 'Sign up' CTA text into 'Get Started' CTA across all the banners on your website. 

  • Use the CSS code editor to change the appearance of certain elements such as font size, color, placement, shadow or border effect of an element on the variation page. These CSS changes are applied by appending a <style> tag to the end of the <body> tag. 
    Example: Adding a border and shadow to the headline tag in your variation page.

Zoho PageSense also lets you implement customized JS/CSS code changes to your entire website under its Project JS Settings.
To add the custom JS/CSS code:
1. Select your A/B experiment and click the EDITOR tab on the top.

2. You can do any of the following:

a. To add custom JS/CSS code specific to a variation, click the JS button at the top-left of the visual editor and paste or type your Javascript for the variation. Click the CSS tab to add custom CSS code.

For example, lets say you want to change the text on a button from 'View more' to 'Read more' on your variation page. You can add its respective Custom Javascript code within the JS code editor to apply the changes to a particular variation page, including the original version in your experiment.  


On the other hand, say you want to apply a background color to a section on your variation page. In this case, your CSS custom code can be something like the ones shown below, and this code will be executed when the particular variation page loads on your user's web browser.


b. To apply JS/CSS changes to all the variations, click the Global Code button at the top-right of the visual editor and paste or write your desired Javascript code for the experiment within the JS section. Click CSS tab to add a custom CSS code. 

For example, let's say you want to change the 'View more' button on your web pages to 'Read more'. You can add its respective Javascript within the Global Code editor to apply the changes in all of the variation pages, including the original version in your experiment.  

On the other hand, say you want to apply a background color to a section on your variation pages. In this case, you can write its corresponding CSS code within the Global Code editor and test them through all of your variation pages, including the original version in the A/B experiment.


           
3. Click Save and Next to save the changes.

Alert: You will be able to make changes to the variations of your A/B test only when the experiment is in the draft or paused state.

      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 FormsLegalMobile App
                              Form DesignerHRMobile 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 FormsEncrypted Forms

                              Secure Forms

                              WCAG

                                      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

                                                                                                                        • Add and edit the background image in the variation

                                                                                                                          Having a relevant background image for your business site can help showcase your products and services in a visually appealing way and allow users to develop an instant connection with your brand. This could include displaying a relevant cover ...
                                                                                                                        • 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. ...
                                                                                                                        • Create a Split URL test using advanced URL targeting options

                                                                                                                          Using URL targeting in the Split URL test allows you to pick the specific web pages where you want to run your experiment. This is useful for presenting experiment variants on a particular set of pages, defined by their match types, such as simple ...
                                                                                                                        • Integrate Kissmetrics with Zoho PageSense

                                                                                                                          With the Kissmetrics integration, you can track web metrics for each variation in your Zoho PageSense experiment. To enable the integration, add the Kissmetrics integration code snippet in the pages you want to track. After you set it up once, it ...
                                                                                                                          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