There are two ways to add Hotjar to your PrestaShop pages:
-
Insert the Hotjar Tracking Code in a Template
PrestaShop uses the Smarty CMS. The Hotjar Tracking code can be added to your PrestaShop pages by editing the Smarty CMS templates (.tpl files). Learn more about adding Hotjar to Smarty Templates.
-
Insert the Hotjar Tracking Code using a Module
You can also insert the Hotjar Tracking Code via a PrestaShop module. There are several modules available which allow you to insert custom JavaScript on your pages. Learn more about this installation method below.
Installing Hotjar using a PrestaShop Module
Find and copy your Tracking Code.
Each site you add to your Hotjar account will have its own unique Tracking Code to install. You can find your Tracking Code to install by going to Sites & Organizations and clicking on the Tracking Code button next to the site URL. Copy the code directly from your Hotjar Site, when adding it to your website code. Avoid sharing the code via email or copying it from a third party tool, because this can sometimes result in subtle modifications made to the code itself.
Paste the Hotjar Tracking Code into the module.
The specific method for adding the JavaScript will vary depending on the PrestaShop module you are using. Refer to the module's documentation for more information.
Your Hotjar Tracking Code is now installed.
Once you have added the Hotjar Tracking Code to your site, you can following the steps in this article to confirm the installation was successful.
Keep Tracking Code in mind when making design changes
If after you install the Tracking Code, your website undergoes a major design change check to ensure your Tracking Code is still installed.