Hotjar Integration
How it works
Our app deletes the Hotjar cookies when the page loads. However, those cookies are then created by Hotjar again once the cookie bar is accepted.
When the initial state is set to block the Analytics and Marketing cookie groups or the customer opts out, the script that is setting the Hotjar will not be executed.
Integration Steps
- Open Shopify Admin.
- Click on Online Store link in the left menubar.
- Click on the Actions dropdown button and select Edit Code from there.
- A new page will open with a list of files on the left side of the screen.
- Create a new liquid file in the Snippets section of the theme files, called
Hotjar-integration-script
- After that copy the content of the integration script provided below and paste it in the newly created Snippet file:
- Locate the original Hotjar script and do the following:
Step 1. Copy the content of the Hotjar script and paste it under the line “// The content of Hotjar script goes here” in the integration script
Only the highlighted part shown below of the original Hotjar script needs to be added. Without the opening and the closing <script> tags.
Step 2. Comment out or delete the original Hotjar scripts and save the changes.
- Open the
theme.liquid
file.
- Locate the opening
<head>
tag and after it, add the following line of code:
<!-- Hotjar integration script Consentmo -->
{% render 'Hotjar-integration-script' %}
A reference on the process can also be checked here:
Need help?
In case you need any assistance, please make sure to reach out to our support team via live chat or at support@consentmo.com
Updated on: 21/07/2025
Thank you!