Using Hotjar Pixel with Google Tag Manager on Shopify

You can add your Hotjar Pixel on Shopify if you're using Google Tag Manager and the TrackPixel.app to manage tags on your Shopify website.

Follow these instructions to install the Google Tag Manager pixel on your Shopify store. 

Hotjar Tracking Code tag from within Google Tag Manager 

From your Google Tag Manager dashboard, click Add a new tag.

Click the tag icon and select Hotjar Tracking Code from the list.

Enter your Hotjar Site ID into the text field.

To get your Hotjar Site ID, visit your Sites page. From here you will see a listing of the Sites and Organizations you have access to, along with the Site IDs to the left of the Site URL.

Hotjar Sites page with Site IDs.

Click in the Triggering area to choose what pages the Tracking Code will appear on.

Google Tag Manager trigger area.

Select All Pages for the trigger and then click Save.

Google Tag Manager All Pages trigger.

Single Page Applications should only use the "Page View" trigger type

Google Tag Manager's state change triggers conflict with Hotjar's own system for detecting changes in single page applications. For more information, take a look at the Google Tag Manager article about the Page View trigger.

Click the Submit button on the upper right-hand side of the Workspace page.

Click on the Publish button to publish the tag.

Wait a few minutes for Google and then check the installation has worked from within Hotjar.

You should see a message confirming the installation inside Hotjar

More information can be found here: https://help.hotjar.com/hc/en-us/articles/115009499708-Google-Tag-Manager-