gs(); if ($ss['ea'] == true) { if (current_user_can('level_8')||current_user_can('activate_plugins')) { return true; } } return false; } /* function aac() Adds Google Analytics code to page */ function aac() { anflex_msg('aac() started'); if ($this->aef()==false) { $ss = $this->gs(); ?> aef()==true) { ?> $this->d_gaid, 't' => false, 'ea' => true, 'lt_e' => false, 'lt_el' => '', 'lt_d' => false, 'lt_dl' => $this->d_el, ); /* Get previously saved preference and overwrite defaults */ $ss = get_option($this->aon); /* delete whole database entry if oblivious setting is in the db */ if($ss['tracking']) { anflex_msg('gs() old settings detected'); delete_option($this->aon); anflex_msg('gs() old settings deleted'); } if(!empty($ss)) { /* oblivious setting cleanup */ foreach ($ss as $key => $option) { if($key=='tracking') {$s['t']==$option;unset($ss[$key]);} if($key=='exclude_admin') {$s['ea']==$option;unset($ss[$key]);} if($key=='link_tracking_external') {$s['lt_e']==$option;unset($ss[$key]);} if($key=='link_tracking_external_exclude_list') {$s['lt_el']==$option;unset($ss[$key]);} if($key=='link_tracking_download') {$s['lt_d']==$option;unset($ss[$key]);} if($key=='link_tracking_download_extension_list') {$s['lt_dl']==$option;unset($ss[$key]);} if($key=='event_tracking') {unset($ss[$key]);} } /* integrate with new setting */ foreach ($ss as $key => $option) { $s[$key] = $option; } } update_option($this->aon,$s); return $s; } /* function ap() Prints admin panel HTML */ function ap() { anflex_msg('ap() started'); $s = $this->gs(); if (isset($_POST['update_gaid'])) { $s['gaid'] = isset($_POST['gaid'])?$_POST['gaid']:$s['gaid']; update_option($this->aon, $s); ?>

aon, $s); ?>

aon, $s); ?>

Anflex GA Settings

">

Tracking Setup

d_gaid) { ?> change

">

change

">

Tracking Options

Admin Exclusion

/>

Check this option if Administrator should be excluded from analytics data. With this checkbox checked, Google Analytics code snippet won't be inserted to the web pages.

Basic Link Tracking

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

/>

Check this option to enable basic external link tracking. Clicks on links to pages in different domain automatically counted as External Links. 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

Default blank

/>

Check this option to enable basic download link tracking. Clicks on links to files that has file extensions in the below box (comma-separated) automatically counted as Download Links.

File extensions to track as downloads

d_el) { ?>

Default d_el; ?>