How To Install Helpjuice
It takes just a few minutes to connect Helpjuice with your website.
Table of Contents
Getting Helpjuice set up on your site is quick and seamless - just a few lines of code and you’ll have your knowledge base live for users or internal audiences. Whether your site is a traditional multi-page app or a single-page JavaScript app, this guide takes you through embedding, routing considerations, and troubleshooting common issues so your content displays reliably across environments.
In this article, you’ll learn:
- How to embed Helpjuice using JavaScript
- How to set it up for single-page / hash-based apps (if applicable)
- What to do if internal articles aren’t appearing
Installing Helpjuice via JavaScript Embed
Standard Websites
Copy the JavaScript embed code provided by Helpjuice and replace YOUR_SUBDOMAIN with your actual subdomain, which is what is displayed right before .helpuice. For example: if the knowledge base is https://help.helpjuice.com, the subdomain is help
<div id="helpjuice_js_widget_content">
<img src='https://helpjuice.com/images/cube-theme/loading.gif' class="helpjuice-loading-spinner" />
</div>
<script>
var helpjuice_account_url = "https://YOUR_SUBDOMAIN.helpjuice.com";
</script>
<script src="https://s3.amazonaws.com/assets.helpjuice.com/helpjuice.min.js"></script>Paste it into your website code wherever you want the Helpjuice widget or content to appear (e.g. inside a <div> container).
Make sure you include the <script> tag that references helpjuice.min.js and define helpjuice_account_url using your Helpjuice subdomain.
📌 To see an example of a Javascript Embed Knowledge Base visit: https://javascript-example.helpjuice.com/
Single-Page / Hash-Based Apps
This only applies to 1-page, hash based, apps. In case you are using a single page application, such as Ember or Angular, it's important to define a variable, where your knowledge base hash is living on.
Define a variable helpjuice_preset_hash corresponding to the part of the URL (hash) where the KB should load.
Example: If your route is #settings/help, then helpjuice_preset_hash should be set to "settings/help".
The embed code is similar to the standard version, but with this additional variable.
<div id="helpjuice_js_widget_content">
<img src='https://helpjuice.com/images/cube-theme/loading.gif' class="helpjuice-loading-spinner" />
</div>
<script>
var helpjuice_account_url = "https://YOUR_SUBDOMAIN.helpjuice.com";
var helpjuice_preset_hash = "";
</script>
<script src="https://s3.amazonaws.com/assets.helpjuice.com/helpjuice.min.js"></script>Content Targeting: Opening a Specific Article or Category
By default the embed opens your knowledge base's home page. You can target a specific article or category instead in two ways, which take effect in this order.
1. A path in helpjuice_account_url
Append the article or category path to helpjuice_account_url instead of using the bare subdomain.
<script>
var helpjuice_account_url = "https://YOUR_SUBDOMAIN.helpjuice.com/your-article-or-category-path";
</script>This opens that specific article or category on load, instead of the home page.
2. The host page's own URL hash
If the page embedding Helpjuice has its own hash in the URL (for example https://yoursite.com/help#/en_US/category/article), the embed reads that hash and navigates to the matching article on load.
This takes precedence over any path set in helpjuice_account_url - if both are present, the host page's hash wins.
📌 This is different from helpjuice_preset_hash above, which sets a fixed mount point at embed time. The host page's own hash is read live, so it works for linking to different articles from different pages or links without changing the embed code itself.
Troubleshooting
Internal Articles Not Appearing (Even When Logged In)
- Problem: Embedding via iframe or script may not pass session cookies, so internal articles might not show up in certain contexts.
- Solution: Host your knowledge base on a subdomain of your main domain, so authentication works properly.
Best Practices
- Use the provided embed code exactly and don’t remove parts unless you are completely sure.
- Test embedding on a staging or development environment before deploying to production.
- For single-page apps, double check that the hash or routing logic does not interfere with Helpjuice’s loading behavior.
- After embedding, log in an incognito/private window to test how internal vs public content behaves.