Add Custom JavaScript to Your Help Center

Learn how to use JavaScript to add custom functionalities to your help center.

2 min read

You can add custom JavaScript to your Notiondesk help center to integrate third-party services, track custom events, or add interactive features that aren't available out of the box.

icon
For security reasons, custom JavaScript is only allowed on custom domains.

What you can do with custom JavaScript

JavaScript lets you extend your help center beyond its default capabilities. Common use cases include:

  • Third-party integrations: Connect services that Notiondesk doesn't natively support.
  • Custom analytics tracking: Send events to tools like Mixpanel, Hotjar, or Segment to track specific user actions.
  • Interactive features: Add dynamic elements like tooltips, announcement banners, or custom navigation behavior.
  • Marketing and conversion tools: Embed retargeting pixels, A/B testing scripts, or lead capture widgets.

How to add custom JavaScript

  1. Go to Settings → Customization.
  1. Open the Advanced section.
  1. Paste your JavaScript code in the Custom JavaScript text box.
  1. Click Save changes.

Your script will load on every page of your help center after the next page refresh.

Examples

Add a Hotjar tracking script

<script>
  (function(h,o,t,j,a,r){
    h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
    h._hjSettings={hjid:YOUR_HOTJAR_ID,hjsv:6};
    a=o.getElementsByTagName('head')[0];
    r=o.createElement('script');r.async=1;
    r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
    a.appendChild(r);
  })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
</script>

Replace YOUR_HOTJAR_ID with your actual Hotjar Site ID.

Display a custom announcement banner

<script>
  document.addEventListener('DOMContentLoaded', function() {
    var banner = document.createElement('div');
    banner.innerHTML = 'We are currently experiencing delays. <a href="/status">Check status</a>';
    banner.style.cssText = 'background:#FEF3C7;padding:10px;text-align:center;font-size:14px;';
    document.body.prepend(banner);
  });
</script>

Track article views with a custom event

<script>
  document.addEventListener('DOMContentLoaded', function() {
    var title = document.title;
    var path = window.location.pathname;
    // Replace with your own analytics call
    console.log('Article viewed:', title, path);
  });
</script>

Best practices

  • Test before publishing. Try your script in the browser console first to catch errors early.
  • Keep scripts lightweight. Heavy scripts can slow down page load times and hurt the reader experience.
  • Avoid modifying core elements. Changing the help center's main layout or navigation with JavaScript can break future Notiondesk updates.
Did this answer your question?