> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.consentmo.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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.

|| NOTE: The below integration is only applicable if the service is added via a script placed in the theme files of the store. If the integration for the service is done through any other channel or service, please check the Help Center for the relevant integration as per your case: [Social Media Pixels integration for Consentmo GDPR app](/en/article/social-media-pixels-integration-for-consentmo-gdpr-app-1cocox4/)

# Integration Steps

 
1. Open **Shopify Admin**.

2. Click on **Online Store** link in the left menubar.

3. Click on the **Actions** dropdown button and select **Edit Code** from there.

4. A new page will open with a list of files on the left side of the screen.

5. Create a new liquid file in the **Snippets** section of the theme files, called `Hotjar-integration-script.liquid`

6. After that copy the content of the integration script provided below and paste it in the newly created Snippet file:

| [Download](https://gdprstorage.b-cdn.net/faq/files/Hotjar%20Integration%20Script.zip) Hotjar integration script

7. 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.

![](https://storage.crisp.chat/users/helpdesk/website/-/b/0/7/f/b07f7406951a4000/hotjar-original-script_zwuowi.png)

**Step 2.** **Comment out** or **delete** the **original Hotjar scripts** and save the changes.

8. Open the `theme.liquid` file.

9. Locate the opening `<head>` tag and after it, add the following line of code:

```javascript
<!-- Hotjar integration script Consentmo -->
{% render 'Hotjar-integration-script' %}
```



### A reference on the process can also be checked here:

${youtube}[Consentmo GDPR - Hotjar integration process](pBtZP7vaGpA)

||| NOTE: ${color}[#2185e4](Make sure to remove the added code before deleting the app. This way, no snippets of code will be left in your theme. For more information on what you should be aware of when deleting our app check) [this article](/en/article/uninstalling-the-consentmo-app-1t7juar/) of our FAQ page.

# 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