You are here

function _hotjar_check_status in Hotjar 7

Same name and namespace in other branches
  1. 6 hotjar.module \_hotjar_check_status()

Check current request HTTP status.

1 call to _hotjar_check_status()
_hotjar_access in ./hotjar.module
Determines whether we add tracking code to page.

File

./hotjar.module, line 235
Drupal Module: Hotjar.

Code

function _hotjar_check_status() {

  // Get page status code for visibility filtering.
  $status = drupal_get_http_header('Status');
  $not_tracked_status_codes = array(
    '403 Forbidden',
    '404 Not Found',
  );
  return !in_array($status, $not_tracked_status_codes);
}