How do I add a third-party service to Zoho Sites Cookie Bar?

How do I add a third-party service to Zoho Sites Cookie Bar?

Create a third party cookie configuration JSON array to be included in the default cookie configuration JSON to display the third party cookies in the Cookie consent banner.

This configuration can be added to the header/footer code.

 

Code for adding the third party cookie configuration JSON to the default configuration JSON:

var thirdparty_cookies={

zc_cookies:[{

"group_id": "<category_identifier>",

"zs_name":"<service_name>",

"zs_desc":"<service_description>",

"zc_detail":[{

"c_name": "<cookie_name>",

"c_type" : "<cookie_type>",

"c_purpose" : "<cookie_purpose>",

"c_expiry" : "<cookie_expiry_duration>"

},

"group_id": "<category_identifier>",

"zs_name":"<service_name>",

"zs_desc":"<service_description>",

"zc_detail":[{

"c_name": "<cookie_name>",

"c_type" : "<cookie_type>",

"c_purpose" : "<cookie_purpose>",

"c_expiry" : "<cookie_expiry_duration>"

}]

}]

}

window._zcBan.set_config(thirdparty_cookies);


category_identifier - "essential" or "functional" or "analytics".
c_type - "server" or "client"
c_expiry - "1 day". It could be 1 day, 30 days, 2 Months etc. 
 

 

Method to handle consent in Zoho Sites cookie bar

 

Event listeners should be added by the site owner to accept and decline events. These two event listeners are created in the document object and will be triggered for accept and decline respectively.

 

In the below sample code, two listeners are added to the document object.

  • When the user accepts cookies, the acceptConsent event is triggered with the categories accepted.

  • When the user declines cookies, the declineConsent event is triggered.

  • It is the responsibility of the site owner to handle the respective third party cookies based on the event listeners for accept and decline events.

Here is the script to handle consent in headers and footers:

 

document.addEventListener('acceptConsent', (e) => {

    // Handle for accept event

});

 

document.addEventListener('declineConsent', (e) => {

    // Handle for decline event

});


The event 'e' will have the following details in JSON object format.
{
      "zc_optOut": true,
      "essential": true,
      "functional": true,
      "analytics": true,
      "event_origin": "click"
}

"zc_optOut" - true in case of accept and false in case of decline
"essential", "functional", "analytics"  - true if accepted, false otherwise.
"event_origin" - "click" (The user has provided consent) or "onload" (The provided consent will be triggered during onload)




    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

                                                                                                          • Zoho Sites Forms

                                                                                                            Web forms help businesses collect important customer information, such as their name or email address. This is crucial in building your sales funnel, tracking customer information, and for other important reasons, such as feedback or purchases. Zoho ...
                                                                                                          • Can I add code from third-party services?

                                                                                                            Yes, you can embed code for objects or iframe from third-party sites. Copy the code from the third-party service. Click the Add icon in the top-left corner of your builder. Click Element. Drag the Code Snippet element and drop it on your page. Enter ...
                                                                                                          • Cookie Bar

                                                                                                            Cookie consent bar notifies visitors that cookies are being used and tells them to adjust their browser settings if they are concerned. To enable the cookie bar on your website: Access Configuration under the hamburger menu on the left of your ...
                                                                                                          • Encryption in Zoho Sites

                                                                                                            Encryption is primarily used to safeguard the contents of a message so that only the intended recipient could read it. This is done by replacing the contents with unrecognizable data, which could be understood only by the intended recipient. This is ...
                                                                                                          • HIPAA Compliance with Zoho Sites

                                                                                                            The Health Insurance Portability and Accountability Act (including the Privacy Rule, Security Rule, Breach notification Rule, and Health Information Technology for Economic and Clinical Health Act) ("HIPAA"), requires Covered Entities and Business ...
                                                                                                            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