Add custom codes for customizing your community or integrate with third-party analytics, messaging, and tracking tools.
❗Important Note: Since custom codes can conflict with the community's underlying code and result in user-experience difficulties, coding knowledge is required when adding custom codes.
Supported ccode:
The Custom Code Snippet App only supports HTML and JS.
Community admins cannot integrate server-side languages (such as Perl, PHP, Python, or Ruby) in any code section.
Adding custom codes to a community is an advanced modification that falls outside of the Bettermode Support Team's scope. Since the custom codes can be the root cause of some issues, checking a community's custom code can be an important troubleshooting step. As a result, the Bettermode Support Team may request that the custom code is removed to conduct troubleshooting.
Tags:
If the embeddable code has opening and/or closing tags, make sure to add them to the code.
❗Important Note: Information related to the tags below is just for reference purposes. The Custom Code Snippet App does not validate added codes. For example- If the 'meta' tag is added in the body, the app won't throw an error.
Link tag: <link>: The <link> tag defines a link between a document and an external resource and always goes in the <head> element.</head>
Meta tag: <meta>:**The <meta> tag provides metadata about your site and always goes in the <head> code</head> section.
Script tags: <script> </script>: The <script> tag</script> allows you to embed JavaScript in the site and can be added in the <head> or </head>.
How to enable Custom Code Snippet App
Like any other app in your community, you need to first install the app: Learn how to install an app
Once installed, a box for the Head and another box for the Body codes will appear:
Head code: Code that is entered in the Head tag is applied to the entire community and allows to link external resources, adding metadata, etc.
Body code: Code that is entered in the Body tag is applied to the entire community and allows you to add scripts to the community.
❗Important Note: If any third-party cookies are added using the Custom Code Snippet App, it will not be compatible with Bettermode's Cookies Consent App. To learn more about the Cookies Consent App, please visit this article.