How to track different projects or companies for the same user

When you are handling different companies of projects in your SaaS you can track your user's companies easily by updating your live chat javascript snippet code following the below example:


<script>
    window.customerlySettings = {
        app_id: "00c4ed07",

        user_id: 4, // Optional
        name: "Sarah", 
        email: "sara@company.com", 
        

        //Company Properties can be added here as you wish 

        company: {
            company_id: "2", // Your internal ID of the company or project
            name: "Customerly", // The name of the user's project or company 
           
            //Add another property here that you might need to track
            //The format should be
            //property_name: property_value
            license_expire_at: 1603490400
        }
       
    };
    !function(){function e(){var e=t.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://widget.customerly.io/widget/00c4ed07";var r=t.getElementsByTagName("script")[0];r.parentNode.insertBefore(e,r)}var r=window,t=document,n=function(){n.c(arguments)};r.customerly_queue=[],n.c=function(e){r.customerly_queue.push(e)},r.customerly=n,r.attachEvent?r.attachEvent("onload",e):r.addEventListener("load",e,!1)}();
</script>