You are here

function _hotjar_check_status in Hotjar 6

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

Check current request HTTP status.

1 call to _hotjar_check_status()
hotjar_add_js in ./hotjar.module
Insert JavaScript to the appropriate scope/region of the page.

File

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

Code

function _hotjar_check_status() {

  // Get page status code for visibility filtering.
  $headers = _hotjar_get_headers();
  $status = $headers[':status'];
  $not_tracked_status_codes = array(
    '403 Forbidden',
    '404 Not Found',
  );
  return !in_array($status, $not_tracked_status_codes);
}