JavaScript is a programming language that makes websites interactive. It’s what makes things on a website do something. For example:
A button that changes color when clicked or shows a pop-up message.
A live chat box that appears on the corner of your screen.
How does JavaScript work in Cobot?
In Cobot, you can use the JavaScript field under Customize » JavaScript to add your own JavaScript code. When you enter code here, it will run on the public and member facing pages of your Cobot space (like the member portal or signup pages) , giving you the ability to add custom features or functionality.
What can you do with this?
Here are some examples:
Add tools like Google Analytics or Google Tag Manager to track visitor activity.
Add a pop-up to welcome users. For more information on how to do this, click here.
Integrate a live chat widget or custom styling for buttons and menus.
Adding Google Analytics 4 (GA4)
How to connect Google Analytics 4 (GA4) to Cobot? The following script needs to be added under Customize:
function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXX');
What is the difference between Java and JavaScript?
Cobot doesn’t support Java, which is a completely different programming language.
Java: A more complex programming language that must be compiled (converted into a different format before running).
JavaScript: A simpler script that runs directly in your browser and needs no compilation.
If you have questions, let us know!