You are here

function hook_hotjar_access in Hotjar 7

Same name and namespace in other branches
  1. 8.2 hotjar.api.php \hook_hotjar_access()
  2. 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

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;
}