function hook_hotjar_access in Hotjar 7
Same name and namespace in other branches
- 8.2 hotjar.api.php \hook_hotjar_access()
- 8 hotjar.api.php \hook_hotjar_access()
Control access to a Hotjar tracking code.
Modules may implement this hook if they want to disable tracking for some reasons.
Return value
bool|null
- HOTJAR_ACCESS_ALLOW: If tracking is allowed.
- HOTJAR_ACCESS_DENY: If tracking is disabled.
- HOTJAR_ACCESS_IGNORE: If tracking check is
1 invocation of hook_hotjar_access()
- _hotjar_access in ./
hotjar.module - Determines whether we add tracking code to page.
File
- ./
hotjar.api.php, line 25 - Hooks provided by the Hotjar module.
Code
function hook_hotjar_access() {
// Disable for frontpage.
return current_path() == '<front>' ? HOTJAR_ACCESS_DENY : HOTJAR_ACCESS_ALLOW;
}