The "Custom Code" tab allows you to add custom scripts and CSS to your program and landing pages. This is useful for adding scripts for live chat, cookie consent notices, additional analytics services beyond our Google Analytics integration, and your own custom scripts or CSS styles.
You can add custom code specific to your landing page, for your entire program (not including landing pages), or for your entire program when a user is logged in (not including login/enrollment pages).
Please note that Heights Platform is a web application. Many areas of your program load and refresh without causing your browser to refresh the entire page. This can impact the functionality of certain scripts that are not designed for this use (such as certain live chat plugins or other scripts that depend on full page refreshes in order to load). Custom scripts that you add will be inserted in the footer of your program HTML.
Adding a Cookie Consent Popup
Many European countries have laws requiring consent to cookies being used on a website. If you need to add a notice or cookie consent bar to your website, we recommend: https://www.osano.com/cookieconsent. They offer a free tool to generate a cookie consent bar for your website. You can paste the code generated from this service in the "landing scripts" area of your custom code to display this on your landing page. Please ensure that you have also enabled your landing page as your home page in your account settings.
Providing Personalization Data to Embedded Widgets/Scripts
When a student is signed into Heights Platform, we expose their ID, full name, and email address inside the HTML of each page they visit. This data can be used to provide a more personalized experience through a script that you might integrate with the custom code feature. For example, let's say you wanted to have a live chat widget that automatically populates the student's name and email in order to show the student past conversations, and prevent the student from having to fill in their name and email each time they use your chat. Below is an example of how Heights Platform renders this data in each page's HTML:
<span class="user-id" style="display:none;" data-id="71"></span> <span id="current_user_email" style="display:none;" data-user-email="firstname.lastname@example.org"></span> <span id="current_user_name" style="display:none;" data-user-name="Ashley Green"></span>
Below is an example of what you could add to the custom code tab in the "program logged in scripts" section to provide the student name and email to a script like a live chat or support widget that you wish to integrate:
NOTE: We cannot provide support for code customizations, or guarantee that they will function correctly in your program. You may wish to hire a developer to help you implement this advanced functionality.
Warning: This is an advanced feature. We cannot guarantee Heights Platform's compatibility with third-party scripts you may add, both in current and future versions of our software. Using certain scripts could cause conflicts that might impact the appearance and functionality of your program.