function crazyegg_is_page_allowed in Crazy Egg Integration 7
Same name and namespace in other branches
- 8 crazyegg.module \crazyegg_is_page_allowed()
Check if actual page URL matches patterns listed in `crazyegg_paths` variable. If the variable is empty, return true.
Return value
bool
1 call to crazyegg_is_page_allowed()
- crazyegg_page_alter in ./
crazyegg.module - Implements hook_page_alter(). Checks all conditions and injects tracking script into the page if needed
File
- ./
crazyegg.module, line 103 - The official Crazy Egg Plugin for Drupal. The easiest, free way to add your Crazy Egg tracking script to your Drupal site. See https://www.crazyegg.com for details.
Code
function crazyegg_is_page_allowed() {
$current_path = current_path();
$current_path_alias = drupal_lookup_path('alias', $current_path);
$crazyegg_paths = trim(variable_get('crazyegg_paths', ''));
return empty($crazyegg_paths) || drupal_match_path($current_path, $crazyegg_paths) || drupal_match_path($current_path_alias, $crazyegg_paths);
}