Closed (fixed)
Project:
Hotjar
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Jul 2016 at 07:53 UTC
Updated:
15 Feb 2017 at 18:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tikaszvince commentedHi,
I think
hook_preprocess_pageas right to add JS to page as any other. Before we try to find other point for adding tracking code, please check these:Is tracking code placed in
<head>when you view frontpage with an anonymous user?Please check your settings on admin/config/system/hotjar page!
Does your site has a Hotjar ID?
Are tracking settings allow trackink for anonymous user?
thanks
Comment #3
sanjay.soni commentedTracking code is not adding because we are using panels_everywhere module and "hook_preprocess_page" is not compatible with panels_everywhere so this module is not allowing to add the script.
Please find below references.
https://www.drupal.org/node/2462541
https://www.drupal.org/node/1190894
introducing a patch so that hotjar module can be compatible with panel_everywhere module.
Thanks
Comment #4
sanjay.soni commentedAny update on this?
Comment #5
tikaszvince commentedI just don't like the idea to use
hook_preprocess_htmlbecause at that point scripts already added. Hotjar doesn't need to add at the end of the page rendering process.Maybe the
hook_page_buildwould be the best choice. Please check the patch I attached with panels_everywhere.Comment #7
tikaszvince commentedComment #8
tikaszvince commentedComment #9
aarontocenter commentedThe issue that I had was after install, the configuration page at
/admin/config/system/hotjarwould reset back to the System Module list, this may be do to the admin theme, but the way I fixed it was to enable the Admin Hotjar in Permissions forAnonymoususer roles.Once the single permission was enabled, tested as accessible via anonymous, then disabled the permission for anonymous, saved, and I was able to access the admin page for Hotjar through the Admin Theme menu just fine. Hope this helps.