Last Updated: December 21st, 2024.
Installing HelperHat on your website is quick and easy. Follow the steps below to start providing simplified customer support with HelperHat.
To begin you'll need your unique HelperHat installation code which is provided during the HelperHat onboarding steps. It should look something like this:
If you've already signed up successfully, then follow these instructions to get your installation code:
Once you have the code, add it to your website's HTML. Here's how:
</body>
tag
in the HTML of
each page where you want to enable HelperHat. This is usually found near
the bottom of your HTML files.</body>
tag.
If you'd like to open the HelperHat chat window dynamically from a button or
link on your website,
you can use the openHelperHat
function that is automatically
provided by the HelperHat installation script.
Here's how to add it:
<!-- A button to open the HelperHat chat -->
<button onclick="openHelperHat()">
Open HelperHat
</button>
<!-- Or A text link to open the HelperHat chat -->
<a href="javascript:void(0);" onclick="openHelperHat()">
Open HelperHat
</a>
That's it! When a user clicks the button or link, it will open the HelperHat chat window, just like clicking the floating icon on your website.
Note: The openHelperHat
function relies on the
floating icon being available on the page.
If the floating icon is hidden or not displayed for any reason, the function
may not work.
After installing HelperHat on your website, you can further enhance its AI responses by adding custom data tailored to each customer. This personalization can include, but is not limited to:
By providing these details through the
window.customHelperHatData
variable,
HelperHat's AI can deliver more personalized and contextually relevant
responses to your
customers.
How to Add Custom Data:
To ensure the custom data is available when HelperHat initializes, you must
define the
window.customHelperHatData
variable in a
<script>
block
before including the HelperHat installation script.
Why This Is Important: Defining
window.customHelperHatData
before
the installation script ensures the data is ready and accessible when the
HelperHat script
loads and initializes.
If the custom data is defined afterward, it will not be available for
HelperHat's AI to use.
Place the custom data script above the HelperHat installation script in your HTML, as shown below:
Example: Adding Multiline Data
<!-- Start of HelperHat Custom Data -->
<script>
window.customHelperHatData =
Customer's Name: Jane Smith
Customer's Order History:
- Order #456:
2 Floral Dresses, Item #123
- Order #789:
1 Silk Scarf, Item #456
;
</script>
<!-- Start of HelperHat Installation Code -->
<script async defer src="https://helperhat.com/install.js?businessId=123"></script>
In this example, multiple lines of data are provided, including the customer's name, order history, and cart details. HelperHat will use this information to address the customer by name and reference their past interactions and preferences.
Example: Adding Single Line Data
<!-- Start of HelperHat Custom Data -->
<script>
window.customHelperHatData = "Customer's Name: Jane Smith";
</script>
<!-- HelperHat Installation Script -->
<script async defer src="https://helperhat.com/install.js?businessId=123"></script>
This single-line example is straightforward. HelperHat's AI will recognize the customer's name and use it to create more personalized greetings and responses.
Tips & Best Practices:
window.customHelperHatData
dynamically based on the currently logged-in customer's details and
activities to ensure
personalized interactions.
Do not include sensitive or personally identifiable information (PII)
in
window.customHelperHatData
. Only include information
that is
appropriate for customer service interactions, such as Customer's
Name or Order
History.
Sticking to non-sensitive customer details helps protect your customers' privacy and complies with data protection regulations.
To make sure HelperHat is correctly installed, follow these steps:
If you see the HelperHat widget, congratulations! You've successfully installed HelperHat.
If the HelperHat widget does not appear:
</body>
tag.
If you continue to experience issues, please contact us at [email protected] for assistance.
If you're not familiar with editing HTML or don't have access to your website's code, you can send the installation instructions to your webmaster. Click the “Email Instructions to Webmaster” button from your onboarding page to email your webmaster.
HelperHat works on all websites and platforms. To guide you better with the installation process, we have created specific guides for popular CMS platforms, e-commerce platforms, web frameworks, and application development environments.
</body>
tag
of the footer.php
file.Note: If your website is hosted on WordPress.com, you cannot add the HelperHat installation code to your website unless you are on their Business plan. The other plans (e.g. Premium, Personal) do not allow users to add JavaScript code.
</body>
tag in
this file.footer.php
file of your theme and paste the code
just before the
closing </body>
tag.Note: Ensure you test the installation on your WooCommerce checkout and product pages to confirm it doesn't interfere with the user experience.
Use the App Market in Wix to add an HTML widget to your page:
There are two ways to add your HelperHat tracking code to your Joomla site. With either method, follow the steps above to copy the HelperHat installation code from your HelperHat account settings first.
</body>
tag.
Note: It is important to clear your Magento cache after making these changes to ensure the HelperHat code is correctly loaded on your site.
_app.js
or
_document.js
file.
useEffect
from React (if using
_app.js
).
_app.js
file:import { useEffect } from 'react';
function MyApp({ Component, pageProps }) {
useEffect(() => {
document.body.insertAdjacentHTML('beforeend', HELPERHAT_INSTALLATION_CODE);
}, []);
return <Component {...pageProps} />;
}
export default MyApp;
HELPERHAT_INSTALLATION_CODE
with the code you
copied.gatsby-browser.js
file.
useEffect
:import { useEffect } from 'react';
export const onClientEntry = () => {
useEffect(() => {
document.body.insertAdjacentHTML('beforeend', HELPERHAT_INSTALLATION_CODE);
}, []);
};
HELPERHAT_INSTALLATION_CODE
with the code you
copied.App.js
).
useEffect
from React.useEffect(() => {
document.body.insertAdjacentHTML(
'beforeend',
HELPERHAT_INSTALLATION_CODE
);
}, []);
HELPERHAT_INSTALLATION_CODE
with the code you
copied.app.component.ts
).
ngOnInit
method, add the following code:ngOnInit() {
document.body.insertAdjacentHTML('beforeend', HELPERHAT_INSTALLATION_CODE);
}
HELPERHAT_INSTALLATION_CODE
with the code you
copied.App.vue
).
mounted
lifecycle hook, add the following code:mounted() {
document.body.insertAdjacentHTML('beforeend', HELPERHAT_INSTALLATION_CODE);
}
HELPERHAT_INSTALLATION_CODE
with the code you
copied.App.svelte
).
onMount
lifecycle function to add the code:import { onMount } from 'svelte';
onMount(() => {
document.body.insertAdjacentHTML('beforeend', HELPERHAT_INSTALLATION_CODE);
});
HELPERHAT_INSTALLATION_CODE
with the code you
copied.web/index.html
file.
</body>
tag.
base.html
).
</body>
tag.
base.html
).
</body>
tag.
layouts/app.blade.php
).
</body>
tag:
{!! HELPERHAT_INSTALLATION_CODE !!}
HELPERHAT_INSTALLATION_CODE
with the code you
copied.application.html.erb
).
</body>
tag:
<%= raw HELPERHAT_INSTALLATION_CODE %>
HELPERHAT_INSTALLATION_CODE
with the code you
copied._Layout.cshtml
).
</body>
tag:
@Html.Raw("HELPERHAT_INSTALLATION_CODE")
HELPERHAT_INSTALLATION_CODE
with the code you
copied.index.html
).
</body>
tag.
index.html
).
</body>
tag.
main.js
).
const { BrowserWindow } = require('electron');
// Create a new BrowserWindow and load your HTML
let mainWindow = new BrowserWindow({ ...options });
mainWindow.webContents.on('did-finish-load', () => {
mainWindow.webContents.executeJavaScript(
document.body.insertAdjacentHTML('beforeend', HELPERHAT_INSTALLATION_CODE);
);
});
HELPERHAT_INSTALLATION_CODE
with the code you
copied.