anflex_ga_admin_options_name); if ($anflex_ga_saved_preferences['exclude_admin'] == true) { if (current_user_can('level_8')||current_user_can('activate_plugins')) { return true; } } return false; } /* Code addition */ function anflex_ga_add_code() { if ($this->anflex_ga_admin_exclude_flag()==false) { $anflex_ga_saved_preferences = get_option($this->anflex_ga_admin_options_name); $anflex_ga_gaid = $anflex_ga_saved_preferences['gaid']; $anflex_ga_link_tracking_external = $anflex_ga_saved_preferences['link_tracking_external']; $anflex_ga_link_tracking_external_exclude_list = $anflex_ga_saved_preferences['link_tracking_external_exclude_list']; $anflex_ga_link_tracking_download = $anflex_ga_saved_preferences['link_tracking_download']; $anflex_ga_link_tracking_download_extension_list = $anflex_ga_saved_preferences['link_tracking_download_extension_list']; ?> anflex_ga_admin_exclude_flag()==true) { ?> $this->anflex_ga_default_gaid, 'tracking' => true, 'exclude_admin' => true, 'link_tracking_external' => false, 'link_tracking_external_exclude_list' => '', 'link_tracking_download' => false, 'link_tracking_download_extension_list' => $this->anflex_ga_default_extension_list, 'event_tracking' => false ); anflex_message('anflex_ga_get_preferences: default preferences array called'); /* Get previously saved preference and overwrite defaults */ $anflex_ga_saved_preferences = get_option($this->anflex_ga_admin_options_name); if (!empty($anflex_ga_saved_preferences)) { foreach ($anflex_ga_saved_preferences as $key => $option) { $anflex_ga_settings_array[$key] = $option; } } update_option($this->anflex_ga_admin_options_name, $anflex_ga_settings_array); return $anflex_ga_settings_array; } function anflex_ga_admin_init() { $this->anflex_ga_get_preferences(); } function anflex_ga_print_adminpanel() { $anflex_ga_settings = $this->anflex_ga_get_preferences(); if (isset($_POST['anflex_ga_update_gaid'])) { $anflex_ga_settings['gaid'] = isset($_POST['gaid'])?$_POST['gaid']:$anflex_ga_settings['gaid']; update_option($this->anflex_ga_admin_options_name, $anflex_ga_settings); ?>

anflex_ga_admin_options_name, $anflex_ga_settings); ?>

anflex_ga_admin_options_name, $anflex_ga_settings); ?>

Anflex GA Settings

">

Tracking Setup

anflex_ga_default_gaid) { ?> change

">

change

">

Tracking Options

Admin Exclusion

/>

Check this option if Administrator should be excluded from analytics data. Administrator means users who is Level 8 or who can "activate plugins." With this checkbox checked, Google Analytics code snippet won't be inserted to the web pages, and all link and event tracking functions will be turned off for admin user accesses.

Basic Link Tracking

Links are tracked as Events, found in "Content > Event Tracking".

/>

Check this option to enable basic external link tracking. Click on links to pages in different domain automatically triggers external link tracking. If links to pages in different subdomains should be considered as internal, add domain names in the below box (comma-separated).

Domains to exclude other than the current domain

Currently

Default blank.

/>

Check this option to enable basic download link tracking. Click on links to pages in different domain automatically triggers download link tracking for file extension in the below box. Add or delete file extensions in the below box (comma-separated).

File extensions to track as downloads

anflex_ga_default_extension_list) { ?>

Currently

Default anflex_ga_default_extension_list; ?>