WP-Matomo (WP-Piwik) - Version 0.9.8

Version Description

  • WordPress 3.5 compatibility fix: http://wordpress.org/support/topic/v35-errors-fix?replies=5 (Thanks Christian Foellmann!)
  • Advanced Search Result Analytics, see http://piwik.org/docs/javascript-tracking/#toc-tracking-internal-search-keywords-categories-and-no-result-search-keywords
  • Site Search stats added
  • Use js/index.php: Replaces piwik.js and piwik.php by js/ (instead of piwik.js only)
  • Connection timeout setting added
  • Full reset option added
  • Uninstall script added
  • Stats metaboxes: Date formatted
  • Use proxy settings defined in wp-config.php
  • Piwik.php proxy script added (see http://piwik.org/faq/how-to/#faq_132)
  • Bugfix: After upgrade, Piwik automatically places cookies again (http://wordpress.org/support/topic/after-upgrade-piwik-automatically-places-cookies-again)
Download this release

Release Info

Developer Braekling
Plugin Icon 128x128 WP-Matomo (WP-Piwik)
Version 0.9.8
Comparing to
See all releases

Code changes from version 0.9.7 to 0.9.8

dashboard/.htaccess DELETED
@@ -1 +0,0 @@
1
- Deny from all
 
dashboard/noresult.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*********************************
3
+ WP-Piwik::Stats:SiteSearchNoResults
4
+ **********************************/
5
+
6
+ $aryConf['data'] = $this->callPiwikAPI(
7
+ 'Actions.getSiteSearchNoResultKeywords',
8
+ $aryConf['params']['period'],
9
+ $aryConf['params']['date'],
10
+ $aryConf['params']['limit']
11
+ );
12
+ $aryConf['title'] = __('Site Search without Results', 'wp-piwik');
13
+ if (isset($aryConf['data']['result']) && $aryConf['data']['result'] = 'error')
14
+ echo '<strong>'.__('Piwik error', 'wp-piwik').':</strong> '.htmlentities($aryConf['data']['message'], ENT_QUOTES, 'utf-8');
15
+ else {
16
+ /***************************************************************************/ ?>
17
+ <table class="widefat">
18
+ <thead>
19
+ <tr><th><?php _e('Keyword', 'wp-piwik'); ?></th><th><?php _e('Requests', 'wp-piwik'); ?></th><th><?php _e('Bounced', 'wp-piwik'); ?></th></tr>
20
+ </thead>
21
+ <tbody>
22
+ <?php /************************************************************************/
23
+ if (is_array($aryConf['data'])) foreach ($aryConf['data'] as $aryValues)
24
+ echo '<tr><td>'.$aryValues['label'].'</td><td>'.$aryValues['nb_visits'].'</td><td>'.$aryValues['bounce_rate'].'</td></tr>';
25
+ else echo '<tr><td colspan="2">'.__('No data available.', 'wp-piwik').'</td></tr>';
26
+ /***************************************************************************/ ?>
27
+ </tbody>
28
+ </table>
29
+ <?php /************************************************************************/
30
+ }
dashboard/search.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*********************************
3
+ WP-Piwik::Stats:SiteSearch
4
+ **********************************/
5
+
6
+ $aryConf['data'] = $this->callPiwikAPI(
7
+ 'Actions.getSiteSearchKeywords',
8
+ $aryConf['params']['period'],
9
+ $aryConf['params']['date'],
10
+ $aryConf['params']['limit']
11
+ );
12
+ $aryConf['title'] = __('Site Search Keywords', 'wp-piwik');
13
+ if (isset($aryConf['data']['result']) && $aryConf['data']['result'] = 'error')
14
+ echo '<strong>'.__('Piwik error', 'wp-piwik').':</strong> '.htmlentities($aryConf['data']['message'], ENT_QUOTES, 'utf-8');
15
+ else {
16
+ /***************************************************************************/ ?>
17
+ <table class="widefat">
18
+ <thead>
19
+ <tr><th><?php _e('Keyword', 'wp-piwik'); ?></th><th><?php _e('Requests', 'wp-piwik'); ?></th><th><?php _e('Bounced', 'wp-piwik'); ?></th></tr>
20
+ </thead>
21
+ <tbody>
22
+ <?php /************************************************************************/
23
+ if (is_array($aryConf['data'])) foreach ($aryConf['data'] as $aryValues)
24
+ echo '<tr><td>'.$aryValues['label'].'</td><td>'.$aryValues['nb_visits'].'</td><td>'.$aryValues['bounce_rate'].'</td></tr>';
25
+ else echo '<tr><td colspan="2">'.__('No data available.', 'wp-piwik').'</td></tr>';
26
+ /***************************************************************************/ ?>
27
+ </tbody>
28
+ </table>
29
+ <?php /************************************************************************/
30
+ }
dashboard/visitors.php CHANGED
@@ -45,7 +45,7 @@
45
  $strCounter = substr($strCounter, 0, -1);
46
 
47
  /***************************************************************************/ ?>
48
- <div class="wp-piwik-graph-wide">
49
  <div id="wp-piwik_stats_vistors_graph" style="height:220px;<?php if (!isset($aryConf['inline']) || $aryConf['inline'] != true) { ?>width:100%<?php } ?>"></div>
50
  </div>
51
  <?php if (!isset($aryConf['inline']) || $aryConf['inline'] != true) { ?>
45
  $strCounter = substr($strCounter, 0, -1);
46
 
47
  /***************************************************************************/ ?>
48
+ <div class="wp-piwik-graph-wide" title="<?php _e('The graph contains the values shown in the table below (visitors / unique / bounces). The red line show a linear trendline (unique).', 'wp-piwik'); ?>">
49
  <div id="wp-piwik_stats_vistors_graph" style="height:220px;<?php if (!isset($aryConf['inline']) || $aryConf['inline'] != true) { ?>width:100%<?php } ?>"></div>
50
  </div>
51
  <?php if (!isset($aryConf['inline']) || $aryConf['inline'] != true) { ?>
debug/.htaccess DELETED
@@ -1 +0,0 @@
1
- Deny from all
 
debug/testscript_standalone.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * WP-Piwik
4
+ * Piwik API call test script revision 4
5
+ */
6
+
7
+ /*****************
8
+ * CONFIGURATION *
9
+ *****************/
10
+
11
+ // PIWIK URL, e.g. http://www.website.example/piwik
12
+ $strPiwikURL = "";
13
+ // PIWIK AUTH TOKEN, e.g. 1234a5cd6789e0a12345b678cd9012ef
14
+ $strPiwikAuthToken = "";
15
+ // YOUR BLOG'S URL, e.g. http://www.website.example
16
+ $strPiwikYourBlogURL = "";
17
+ // User agent
18
+ $strUA = ini_get('user_agent');
19
+ // SSL peer verification
20
+ $bolDisableSSLVer = false;
21
+
22
+ /* That's all, stop editing! */
23
+
24
+ /**
25
+ * Get remote file
26
+ *
27
+ * @param String $strURL Remote file URL
28
+ */
29
+ function getRemoteFile($strURL, $strToken, $bolSSL, $strUA) {
30
+ // Use cURL if available
31
+ if (function_exists('curl_init')) {
32
+ // Init cURL
33
+ $c = curl_init($strURL.$strToken);
34
+ // Configure cURL CURLOPT_RETURNTRANSFER = 1
35
+ curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
36
+ // Verbose = 1
37
+ curl_setopt($c, CURLOPT_VERBOSE, 1);
38
+ // Configure cURL CURLOPT_HEADER = 1 & CURLINFO_HEADER_OUT = 1
39
+ curl_setopt($c, CURLOPT_HEADER, 1);
40
+ curl_setopt($c, CURLINFO_HEADER_OUT, 1);
41
+ // Configure SSL peer verification
42
+ curl_setopt($c, CURLOPT_SSL_VERIFYPEER, $bolSSL);
43
+ // Set user agent
44
+ curl_setopt($c, CURLOPT_USERAGENT, $strUA);
45
+ // Get result
46
+ $strResult = curl_exec($c);
47
+ // Close connection
48
+ curl_close($c);
49
+ // cURL not available but url fopen allowed
50
+ } elseif (ini_get('allow_url_fopen'))
51
+ // Get file using file_get_contents
52
+ $strResult = file_get_contents($strURL.$strToken);
53
+ // Error: Not possible to get remote file
54
+ else $strResult = serialize(array(
55
+ 'result' => 'error',
56
+ 'message' => 'Remote access to Piwik not possible. Enable allow_url_fopen or CURL.'
57
+ ));
58
+ // Return result
59
+ return $strResult;
60
+ }
61
+
62
+ if (substr($strPiwikURL, -1, 1) != '/' && substr($strPiwikURL, -10, 10) != '/index.php')
63
+ $strPiwikURL .= '/';
64
+
65
+ $aryURLs = array();
66
+ $aryURLs['SitesManager.getSitesWithAtLeastViewAccess'] = $strPiwikURL.'?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML';
67
+ $aryURLs['SitesManager.getSitesIdFromSiteUrl'] = $strPiwikURL.'?module=API&method=SitesManager.getSitesIdFromSiteUrl&url='.urlencode($strPiwikYourBlogURL).'&format=XML';
68
+ $strToken = '&token_auth='.$strPiwikAuthToken;
69
+ $intTest = 0;
70
+ ?>
71
+ <textarea readonly="readonly" rows="13" cols="100">
72
+ <?php
73
+ foreach ($aryURLs as $strMethod => $strURL) {
74
+ $intTest++;
75
+ echo '*** Test '.$intTest.'/'.count($aryURLs).': '.$strMethod.' ***'."\n";
76
+ echo 'Using: '.(function_exists('curl_init')?'cURL':'fopen')."\n";
77
+ echo 'SSL peer verification: '.(function_exists('curl_init') && !$bolDisableSSLVer?'enabled':'disabled')."\n";
78
+ echo 'User Agent: '.$strUA."\n";
79
+ echo 'Call: '.$strURL.'&token_auth= + TOKEN'."\n";
80
+ $x = microtime(true);
81
+ $strResult = getRemoteFile($strURL,$strToken,!$bolDisableSSLVer,$strUA);
82
+ $x = microtime(true) - $x;
83
+ echo 'Result:'."\n";
84
+ echo htmlentities($strResult)."\n";
85
+ echo 'Time: '.round($x,2).'s'.($intTest < count($aryURLs)?"\n\n":'');
86
+ }
87
+ ?>
88
+ </textarea>
languages/.htaccess DELETED
@@ -1 +0,0 @@
1
- Deny from all
 
languages/wp-piwik-de_DE.mo CHANGED
Binary file
languages/wp-piwik-de_DE.po CHANGED
@@ -626,4 +626,37 @@ msgid "Invalid path. Please enter the file path to Piwik."
626
  msgstr "Ung&uuml;ltiger Pfad. Bitte gib den Dateipfad von Piwik an."
627
 
628
  msgid "Enable shortcodes in post or page content."
629
- msgstr "Aktiviere Shortcodes innerhalb von Artikeln und Seiten."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626
  msgstr "Ung&uuml;ltiger Pfad. Bitte gib den Dateipfad von Piwik an."
627
 
628
  msgid "Enable shortcodes in post or page content."
629
+ msgstr "Aktiviere Shortcodes innerhalb von Artikeln und Seiten."
630
+
631
+ msgid "Connection timeout"
632
+ msgstr "Verbindungs-Timeout"
633
+
634
+ msgid "User agent"
635
+ msgstr "User Agent"
636
+
637
+ msgid "Default tracking"
638
+ msgstr "Standard-Tracking"
639
+
640
+ msgid "Use proxy script"
641
+ msgstr "Verwende Proxy-Skript"
642
+
643
+ msgid "WP-Piwik uses the Piwik default tracking code."
644
+ msgstr "WP-Piwik verwendet den normalen Tracking Code."
645
+
646
+ msgid "WP-Piwik can automatically use js/index.php instead of piwik.js and piwik.php. See"
647
+ msgstr "WP-Piwik kann automatisch js/index.php statt piwik.js und piwik.php verwenden. Siehe"
648
+
649
+ msgid "WP-Piwik will use the piwik.php proxy script. See"
650
+ msgstr "WP-Piwik benutzt das piwik.php-Proxy-Skript, siehe"
651
+
652
+ msgid "Enable shortcodes"
653
+ msgstr "Aktiviere Shortcodes"
654
+
655
+ msgid "Requests"
656
+ msgstr "Anfragen"
657
+
658
+ msgid "Site Search Keywords"
659
+ msgstr "Suchanfragen"
660
+
661
+ msgid "Site Search without Results"
662
+ msgstr "Suchanfragen ohne Ergebnisse"
languages/wp-piwik-it_IT.mo ADDED
Binary file
languages/wp-piwik-it_IT.po ADDED
@@ -0,0 +1,724 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Translation of the WordPress plugin WP-Piwik 0.8.0 by Andr&eacute; Br&auml;kling.
2
+ # Copyright (C) 2010 Andr&eacute; Br&auml;kling
3
+ # This file is distributed under the same license as the WP-Piwik package.
4
+ #
5
+ # Andr&eacute; Br&auml;kling <webmaster@braekling.de>, 2011.
6
+ # Stef Binde <ste@vogliaditerra.com>, 2013.
7
+ msgid ""
8
+ msgstr ""
9
+ "Project-Id-Version: WP-Piwik 0.8.4\n"
10
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-piwik\n"
11
+ "POT-Creation-Date: 2010-07-19 18:06+0000\n"
12
+ "PO-Revision-Date: 2013-01-21 17:15+0100\n"
13
+ "Last-Translator: Stef Binde <ste@vogliaditerra.com>\n"
14
+ "Language-Team: Italian <ste@vogliaditerra.com>\n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+ "Language: it\n"
19
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
20
+ "X-Generator: Lokalize 1.5\n"
21
+
22
+ #: dashboard/browsers.php:12 dashboard/browsers.php:33
23
+ msgid "Browser"
24
+ msgstr "Browser"
25
+
26
+ #: dashboard/browsers.php:22 dashboard/pages.php:43 dashboard/screens.php:22
27
+ #: dashboard/systems.php:22
28
+ msgid "Others"
29
+ msgstr "Altri "
30
+
31
+ #: dashboard/browsers.php:34 dashboard/keywords.php:17 dashboard/pages.php:22
32
+ #: dashboard/screens.php:33 dashboard/systems.php:35 dashboard/visitors.php:53
33
+ #: dashboard/websites.php:19 wp-piwik.php:305
34
+ msgid "Unique"
35
+ msgstr "Unici"
36
+
37
+ #: dashboard/browsers.php:35 dashboard/plugins.php:33 dashboard/screens.php:34
38
+ #: dashboard/systems.php:36
39
+ msgid "Percent"
40
+ msgstr "Percentuale"
41
+
42
+ #: dashboard/keywords.php:12
43
+ msgid "Keywords"
44
+ msgstr "Parole chiave"
45
+
46
+ #: dashboard/keywords.php:17
47
+ msgid "Keyword"
48
+ msgstr "Parole chiavi"
49
+
50
+ #: dashboard/overview.php:12
51
+ msgid "Overview"
52
+ msgstr "Resoconto"
53
+
54
+ #: dashboard/overview.php:42 dashboard/visitors.php:24
55
+ msgid "Visitors"
56
+ msgstr "Visitatori"
57
+
58
+ #: dashboard/overview.php:43
59
+ msgid "Unique visitors"
60
+ msgstr "Visitatori unici"
61
+
62
+ #: dashboard/overview.php:44
63
+ msgid "Page views"
64
+ msgstr "Pagine viste"
65
+
66
+ #: dashboard/overview.php:45
67
+ msgid "Max. page views in one visit"
68
+ msgstr "Massimo di pagine viste in una visita"
69
+
70
+ #: dashboard/overview.php:46
71
+ msgid "Total time spent"
72
+ msgstr "Tempo di rimanenza"
73
+
74
+ msgid "Time/visit"
75
+ msgstr "Media durata per visita"
76
+
77
+ #: dashboard/overview.php:47
78
+ msgid "Bounce count"
79
+ msgstr "Uscite"
80
+
81
+ #: dashboard/overview.php:49 wp-piwik.php:563
82
+ msgid "Shortcut"
83
+ msgstr "Scorciatoia"
84
+
85
+ #: dashboard/pages.php:13
86
+ msgid "Pages"
87
+ msgstr "Pagine"
88
+
89
+ #: dashboard/pages.php:21
90
+ msgid "Page"
91
+ msgstr "Pagina"
92
+
93
+ #: dashboard/pages.php:23 dashboard/plugins.php:32 dashboard/visitors.php:52
94
+ msgid "Visits"
95
+ msgstr "Visite"
96
+
97
+ #: dashboard/plugins.php:12 dashboard/plugins.php:31
98
+ msgid "Plugins"
99
+ msgstr "Plugins"
100
+
101
+ #: dashboard/screens.php:12 dashboard/screens.php:32
102
+ msgid "Resolution"
103
+ msgstr "Risoluzione"
104
+
105
+ #: dashboard/systems.php:12 dashboard/systems.php:34
106
+ msgid "Operating System"
107
+ msgstr "Sistemi operativi"
108
+
109
+ #: dashboard/visitors.php:51
110
+ msgid "Date"
111
+ msgstr "Data"
112
+
113
+ #: dashboard/visitors.php:54
114
+ msgid "Bounced"
115
+ msgstr "Uscite"
116
+
117
+ #: dashboard/visitors.php:67
118
+ msgid "Unique TOTAL"
119
+ msgstr "Unici totali"
120
+
121
+ #: dashboard/visitors.php:67
122
+ msgid "Sum"
123
+ msgstr "Somma"
124
+
125
+ #: dashboard/visitors.php:67
126
+ msgid "Avg"
127
+ msgstr "Media"
128
+
129
+ #: dashboard/websites.php:12
130
+ msgid "Websites"
131
+ msgstr "Provenienze"
132
+
133
+ #: dashboard/websites.php:18
134
+ msgid "Website"
135
+ msgstr "Pagina web"
136
+
137
+ #: wp-piwik.php:110 wp-piwik.php:365
138
+ msgid "Piwik Statistics"
139
+ msgstr "Statistiche Piwik"
140
+
141
+ #. #-#-#-#-# plugin.pot (WP-Piwik 0.8.0) #-#-#-#-#
142
+ #. Plugin Name of the plugin/theme
143
+ #: wp-piwik.php:111 wp-piwik.php:122 wp-piwik.php:123 wp-piwik.php:146
144
+ msgid "WP-Piwik"
145
+ msgstr "WP-Piwik"
146
+
147
+ #: wp-piwik.php:130 wp-piwik.php:131
148
+ msgid "WPMU-Piwik"
149
+ msgstr "WPMU-Piwik"
150
+
151
+ #: wp-piwik.php:142 wp-piwik.php:557
152
+ msgid "yesterday"
153
+ msgstr "ieri"
154
+
155
+ #: wp-piwik.php:143 wp-piwik.php:558
156
+ msgid "today"
157
+ msgstr "oggi"
158
+
159
+ #: wp-piwik.php:144 wp-piwik.php:559
160
+ msgid "last30"
161
+ msgstr "ultimi 30 giorni"
162
+
163
+ #: wp-piwik.php:144 wp-piwik.php:559
164
+ msgid "last 30 days"
165
+ msgstr "ultimi 30 giorni"
166
+
167
+ #: wp-piwik.php:179
168
+ msgid "Settings"
169
+ msgstr "Impostazioni"
170
+
171
+ #: wp-piwik.php:381
172
+ msgid "Change"
173
+ msgstr "Cambia"
174
+
175
+ #: wp-piwik.php:382
176
+ msgid "Currently shown stats:"
177
+ msgstr "Statistiche mostrate attualmente:"
178
+
179
+ #: wp-piwik.php:383
180
+ msgid "Current shown stats: <strong>Overall</strong>"
181
+ msgstr "Statistiche mostrate attualmente<strong>Tutte<strong>"
182
+
183
+ #: wp-piwik.php:448
184
+ msgid "WP-Piwik Settings"
185
+ msgstr "Impostazioni di WP-Piwik"
186
+
187
+ #: wp-piwik.php:455 wp-piwik.php:617
188
+ msgid "Account settings"
189
+ msgstr "Impostazioni Account"
190
+
191
+ #: wp-piwik.php:457 wp-piwik.php:619
192
+ msgid "Piwik URL"
193
+ msgstr "URL di Piwik"
194
+
195
+ #: wp-piwik.php:461 wp-piwik.php:623
196
+ msgid "Auth token"
197
+ msgstr "Auth Token"
198
+
199
+ #: wp-piwik.php:467 wp-piwik.php:628
200
+ msgid ""
201
+ "To enable Piwik statistics, please enter your Piwik"
202
+ " base URL (like http://mydomain.com/piwik) and your"
203
+ " personal authentification token. You can get the token"
204
+ " on the API page inside your Piwik interface. It looks"
205
+ " like &quot;1234a5cd6789e0a12345b678cd9012ef&quot;."
206
+ msgstr ""
207
+ "Per abilitare le statistiche di Piwik devi inserire URL della installazione"
208
+ "di Piwik (p.e.. http://miosito.com/piwik) e la chiave personale di "
209
+ "autenticazione (Token). La chiave si trova nell'interfaccia di Piwik sulla "
210
+ "pagina API. Ha un aspetto simile a: "
211
+ "&quot;1234a5cd6789e0a12345b678cd9012ef&quot;."
212
+
213
+ #: wp-piwik.php:477
214
+ msgid ""
215
+ "<strong>Important note:</strong> If you do not host this blog on your own, "
216
+ "your site admin is able to get your auth token from the database. So he is "
217
+ "able to access your statistics. You should never use an auth token with more "
218
+ "than simple view access!"
219
+ msgstr " "
220
+
221
+ #: wp-piwik.php:485 wp-piwik.php:489
222
+ msgid "An error occured"
223
+ msgstr "E' successo un errore"
224
+
225
+ #: wp-piwik.php:486
226
+ msgid ""
227
+ "Please check URL and auth token. You need at least view access to one site."
228
+ msgstr ""
229
+ "Controlla URL e la chiave di autenticazione (token). Come minimo occorrono "
230
+ "diritti di lettura per una pagina."
231
+
232
+ #: wp-piwik.php:492
233
+ msgid "Choose site"
234
+ msgstr "Seleziona pagina"
235
+
236
+ #: wp-piwik.php:511 wp-piwik.php:547 wp-piwik.php:584 wp-piwik.php:658
237
+ msgid "Save settings"
238
+ msgstr "Salva la configurazione"
239
+
240
+ #: wp-piwik.php:515 wp-piwik.php:643
241
+ msgid "Tracking settings"
242
+ msgstr "Impostazioni Tracking"
243
+
244
+ #: wp-piwik.php:521
245
+ msgid "Add script"
246
+ msgstr "Aggiungi script"
247
+
248
+ #: wp-piwik.php:525
249
+ msgid ""
250
+ "If your template uses wp_footer(), WP-Piwik can automatically add the Piwik "
251
+ "javascript code to your blog."
252
+ msgstr ""
253
+ "Se il tuo template usa wp_footer() Piwik ci può inserire il codice javascript "
254
+ "nel tuo blog automaticamente."
255
+
256
+ #: wp-piwik.php:528
257
+ msgid "Track 404"
258
+ msgstr "Tracciamento 404"
259
+
260
+ #: wp-piwik.php:532
261
+ msgid "WP-Piwik can automatically add a 404-category to track 404-page-visits."
262
+ msgstr ""
263
+ "WP-Piwik può aggiungere in automatico una categoria per tracciare visite 404."
264
+
265
+ #: wp-piwik.php:536 wp-piwik.php:644
266
+ msgid "Tracking filter"
267
+ msgstr "Filtro tracciamento"
268
+
269
+ msgid "Choose users by user role you do <strong>not</strong> want to track."
270
+ msgstr "Seleziona utenti per ruolo che <b>non</b> vuoi tracciare."
271
+
272
+ msgid ""
273
+ "Choose users by user role you do <strong>not</strong> want to track. Requires "
274
+ "enabled &quot;Add script&quot;-functionality."
275
+ msgstr ""
276
+ "Seleziona utenti per ruolo che <b>non</b> vuoi tracciare. "
277
+ "La funziona tracciamento deve essere abilita."
278
+
279
+ #: wp-piwik.php:551
280
+ msgid "Statistic view settings"
281
+ msgstr "Impostazioni per le statistiche"
282
+
283
+ #: wp-piwik.php:554
284
+ msgid "Dashboard"
285
+ msgstr "Dashboard"
286
+
287
+ #: wp-piwik.php:556
288
+ msgid "No"
289
+ msgstr "No"
290
+
291
+ #: wp-piwik.php:557 wp-piwik.php:558 wp-piwik.php:559
292
+ msgid "Yes"
293
+ msgstr "Sì"
294
+
295
+ #: wp-piwik.php:562
296
+ msgid "Display a dashboard widget to your WordPress dashboard."
297
+ msgstr "Visualizza un widget per la dashboard di Wordpress."
298
+
299
+ #: wp-piwik.php:567
300
+ msgid "Display a shortcut to Piwik itself."
301
+ msgstr "Visualizzare una scorciatoia per il Piwik principale."
302
+
303
+ #: wp-piwik.php:568
304
+ msgid "Display to"
305
+ msgstr "visualizzare per"
306
+
307
+ #: wp-piwik.php:579
308
+ msgid "Choose user roles allowed to see the statistics page."
309
+ msgstr "Seleziona il ruolo per poter accedere alla pagina di statistiche."
310
+
311
+ #: wp-piwik.php:612
312
+ msgid "WPMU-Piwik Settings"
313
+ msgstr "Impostazioni WPMU-Piwik"
314
+
315
+ #: wp-piwik.php:636
316
+ msgid ""
317
+ "<strong>Important note:</strong> You have to choose a token which provides "
318
+ "administration access. WPMU-Piwik will create new Piwik sites for each blog "
319
+ "if it is shown the first time and it is not added yet. All users can access "
320
+ "their own statistics only, while site admins can access all statistics. To "
321
+ "avoid conflicts, you should use a clean Piwik installation without other "
322
+ "sites added. The provided themes should use wp_footer, because it adds the "
323
+ "Piwik javascript code to each page."
324
+ msgstr ""
325
+
326
+ #: wp-piwik.php:671
327
+ msgid "If you like WP-Piwik, you can support its development by a donation:"
328
+ msgstr ""
329
+ "Se ti piace WP-Piwik e vuoi contribuire al suo sviluppo, considera una "
330
+ "donazione."
331
+
332
+ #: wp-piwik.php:687
333
+ msgid "My Amazon.de wishlist (German)"
334
+ msgstr "Mia wishlist Amazon (tedesco)"
335
+
336
+ #. Plugin URI of the plugin/theme
337
+ msgid "http://www.braekling.de/wp-piwik-wpmu-piwik-wordpress/"
338
+ msgstr "http://www.braekling.de/wp-piwik-wpmu-piwik-wordpress/"
339
+
340
+ #. Description of the plugin/theme
341
+ msgid ""
342
+ "Adds Piwik stats to your dashboard menu and Piwik code to your wordpress "
343
+ "footer."
344
+ msgstr ""
345
+ "Aggiunge le statistiche di Piwik al menu della Dashboard è il codice di "
346
+ "Piwik nel piè di pagina di Wordpress."
347
+
348
+ #. Author of the plugin/theme
349
+ msgid "Andr&eacute; Br&auml;kling"
350
+ msgstr "Andr&eacute; Br&auml;kling"
351
+
352
+ #. Author URI of the plugin/theme
353
+ msgid "http://www.braekling.de"
354
+ msgstr "http://www.braekling.de"
355
+
356
+ msgid "Credits"
357
+ msgstr "Ringraziamenti"
358
+
359
+ msgid "Thank you very much for your donation"
360
+ msgstr "Grazie per le vostre donazioni"
361
+
362
+ msgid "and all people flattering this"
363
+ msgstr "und alle Nutzern, die bei Flatter klicken"
364
+
365
+ msgid ""
366
+ "Graphs powered by <a href=\"http://www.jqplot.com/\">jqPlot</a>, an open "
367
+ "source project by Chris Leonello. Give it a try! (License: GPL 2.0 and MIT)"
368
+ msgstr ""
369
+ "I grafici sono generati con <a href=\"http://www.jqplot.com/\">jqPlot</a> "
370
+ "un progetto Open-Source di Chris Leonello. Provalo!"
371
+ "(Licenza: GPL 2.0 e MIT)"
372
+
373
+ msgid "Thank you very much"
374
+ msgstr "Mille grazie"
375
+
376
+ msgid ", and"
377
+ msgstr ", e"
378
+
379
+ msgid "for your translation work"
380
+ msgstr "per il vostro lavoro di traduzione"
381
+
382
+ msgid ""
383
+ "Thank you very much, all users who send me mails containing criticism, "
384
+ "commendation, feature requests and bug reports! You help me to make WP-Piwik "
385
+ "much better."
386
+ msgstr ""
387
+ "Un ringraziamento sentito per tutti gli utenti che mi inviano critiche, "
388
+ "proposte e bug reports! Mi aiutate di migliorare WP-Piwik."
389
+
390
+ msgid ""
391
+ "Thank <strong>you</strong> for using my plugin. It is the best commendation "
392
+ "if my piece of code is really used!"
393
+ msgstr ""
394
+ "Grazie <strong> a te</strong> per usare il mio plugin. E' la più grande "
395
+ "soddisfazione se il mio codice viene usato realmente!"
396
+
397
+ msgid "Changes saved"
398
+ msgstr "Cambiamenti salvati"
399
+
400
+ msgid "installed"
401
+ msgstr "installiert"
402
+
403
+ msgid "Next you should connect to Piwik"
404
+ msgstr "Als n&auml;chstes solltest Du eine Verbindung zu Piwik herstellen"
405
+
406
+ msgid "Please validate your configuration"
407
+ msgstr "Bitte &uuml;berpr&uuml;fe Deine Konfiguration"
408
+
409
+ msgid "Default date"
410
+ msgstr "Date default"
411
+
412
+ msgid "Default date shown on statistics page."
413
+ msgstr "Il giorno che verrà mostrato sulla pagina delle statistiche."
414
+
415
+ msgid "Dashboard data"
416
+ msgstr "Dati del dashboard"
417
+
418
+ msgid "Display an overview widget to your WordPress dashboard."
419
+ msgstr "Visualizza un widget per il resoconto sulla dashboard di Wordpress."
420
+
421
+ msgid "Board chart"
422
+ msgstr "Board-Chart"
423
+
424
+ msgid "Display a visitor graph widget to your WordPress dashboard."
425
+ msgstr "Visualizza un grafico con le visite sul Dashboard di Wordpress."
426
+
427
+ msgid "No data available."
428
+ msgstr "Nessun dato disponibile."
429
+
430
+ msgid ""
431
+ "Check this to automatically choose your blog from your Piwik sites by URL. If "
432
+ "your blog is not added to Piwik yet, WP-Piwik will add a new site."
433
+ msgstr ""
434
+ "Spunta questo per selezionare automaticamente il tuo blog tra i siti Piwik "
435
+ "tramite l'URL. Se il tuo blog non è inserito in Piwik Wp-Piwik lo aggiungerà."
436
+
437
+ msgid "If you add the Piwik javascript code by wp_footer(),"
438
+ msgstr "Wenn Du den Piwik-Code per wp_footer() in Dein Blog einbindest,"
439
+
440
+ msgid "WP-Piwik can automatically use js/index.php instead of piwik.js. See"
441
+ msgstr ""
442
+ "WP-Piwik può usare automaticamente js/index.php al posto di piwik.js. Vedi"
443
+
444
+ msgid ""
445
+ "WP-Piwik can automatically force the Tracking Code to sent data in POST. See"
446
+ msgstr ""
447
+ "WP-Piwik può automaticamente forzare l'invio del codice di tracciamento in "
448
+ "POST. Vedi"
449
+
450
+ msgid "Avoid mod_security"
451
+ msgstr "Umgehe mod_security"
452
+
453
+ msgid "Determined site"
454
+ msgstr "Sito rilevato"
455
+
456
+ msgid "Auto config"
457
+ msgstr "Configurazione automatica"
458
+
459
+ msgid "Use js/index.php"
460
+ msgstr "Usa js/index.php"
461
+
462
+ msgid "Show overview"
463
+ msgstr "Visualizza resoconto"
464
+
465
+ msgid "Hide overview"
466
+ msgstr "Nessun resoconto"
467
+
468
+ msgid "SEO <em>(slow!)</em>"
469
+ msgstr "SEO <em>(lento!)</em>"
470
+
471
+ msgid "Display SEO ranking data on statistics page. <em>(Slow!)</em>"
472
+ msgstr ""
473
+ "Visualizza dati SEO ranking sulla pagina delle statistiche. <em>(Lento!)</em>"
474
+
475
+ msgid ""
476
+ "Configure WP-Piwik widgets to be shown on your WordPress Home Dashboard."
477
+ msgstr ""
478
+ "Konfiguriere WP-Piwik-Widgets, die auf Deinem WordPress Home Dashboard "
479
+ "erscheinen sollen."
480
+
481
+ msgid "SEO data"
482
+ msgstr "Dati SEO"
483
+
484
+ msgid "the Piwik team itself"
485
+ msgstr "das Piwik-Team selbst"
486
+
487
+ msgid "Metabox support inspired by"
488
+ msgstr "Supporto Metabox ispirato da"
489
+
490
+ msgid "WP-Piwik support board"
491
+ msgstr "WP-Piwik Support Board"
492
+
493
+ msgid "no registration required, English &amp; German"
494
+ msgstr "nessuna registrazione, inglese e tedesco"
495
+
496
+ msgid "WordPress.org forum about WP-Piwik"
497
+ msgstr "WordPress.org Forum di WP-Piwik"
498
+
499
+ msgid "WordPress.org registration required, English"
500
+ msgstr "Registrazione presso Wordpress.org obbligatorio, in inglese"
501
+
502
+ msgid "Please don't forget to vote the compatibility at the"
503
+ msgstr "Non scordarti di dare una valutazione di compatibilità nella "
504
+
505
+ msgid "Donate"
506
+ msgstr "Donazioni"
507
+
508
+ msgid "My Amazon.de wishlist"
509
+ msgstr "Mia lista di desideri pressom Amazon.de"
510
+
511
+ msgid "Piwik error"
512
+ msgstr "Errore di Piwik"
513
+
514
+ msgid "Important"
515
+ msgstr "Wichtig"
516
+
517
+ msgid "Thanks for using WP-Piwik!"
518
+ msgstr "Grazie per usare WP-Piwik!"
519
+
520
+ msgid "Auto site configuration is"
521
+ msgstr "La configurazione automatico è"
522
+
523
+ msgid "Tracking code insertion is"
524
+ msgstr "L'inserimento del codice tracciamento è"
525
+
526
+ msgid "enabled"
527
+ msgstr "attivato"
528
+
529
+ msgid "disabled"
530
+ msgstr "disattivato"
531
+
532
+ msgid "You are using Piwik"
533
+ msgstr "Stai usando Piwik"
534
+
535
+ msgid "and"
536
+ msgstr "e"
537
+
538
+ msgid ""
539
+ "Error: cURL is not enabled and fopen is not allowed to open URLs. WP-Piwik "
540
+ "won't be able to connect to Piwik."
541
+ msgstr ""
542
+ "Errore: cUrl non è attivato e fopen non ha i permessi per aprire Url. "
543
+ "Wp-Piwik non può connettersi a Piwik."
544
+
545
+ msgid ""
546
+ "<strong>Important note:</strong> If you do not host this blog on your own, "
547
+ "your site admin is able to get your auth token from the database."
548
+ msgstr ""
549
+
550
+ msgid "Add tracking code"
551
+ msgstr "Inserisci codice tracciamento"
552
+
553
+ msgid "Tracking code preview"
554
+ msgstr "Previsione codice"
555
+
556
+ msgid "Piwik Settings"
557
+ msgstr "Impostazioni di Piwik"
558
+
559
+ msgid "Statistics"
560
+ msgstr "Statistiche"
561
+
562
+ msgid ""
563
+ "Either allow_url_fopen has to be enabled <em>or</em> cURL has to be available:"
564
+ msgstr ""
565
+ "O allow_url_fopen deve essere attivato <em>o</em> cURL deve essere "
566
+ "disponibile:"
567
+
568
+ msgid "cURL is"
569
+ msgstr "cURL è"
570
+
571
+ msgid "allow_url_fopen is"
572
+ msgstr "allow_url_fopen è"
573
+
574
+ msgid "not"
575
+ msgstr "non"
576
+
577
+ msgid "available"
578
+ msgstr "disponibile"
579
+
580
+ msgid "Test script result"
581
+ msgstr ""
582
+
583
+ msgid "Please confirm your reset request"
584
+ msgstr ""
585
+
586
+ msgid ""
587
+ "YES, please reset <strong>all</strong> WP-Piwik settings <strong>except<"
588
+ "/strong> auth token and Piwi URL."
589
+ msgstr ""
590
+ "Sì, resetta <strong>tutte </strong> le impostazioni di WP-Piwiki con "
591
+ "eccezione del codice di autenticazione e l'Url di Piwik."
592
+
593
+ msgid "WP-Piwik reset done"
594
+ msgstr "WP-Piwik wurde zur&uuml;ckgesetzt"
595
+
596
+ msgid "Get more debug information"
597
+ msgstr "Ottieni più informazioni per il debug"
598
+
599
+ msgid "Run test script"
600
+ msgstr "Avvia script di test"
601
+
602
+ msgid "Get site configuration details"
603
+ msgstr "Ottieni dettagli sulla configurazione del sito"
604
+
605
+ msgid "Reset WP-Piwik settings except auth token and Piwik URL"
606
+ msgstr ""
607
+ "Resetta tutte le impostazioni di WP-Piwik, con eccezione del codice di "
608
+ "autenticazione e l'URL di Piwik"
609
+
610
+ msgid ""
611
+ "You have to enter your auth token and the Piwik URL before you can access "
612
+ "more debug functions."
613
+ msgstr ""
614
+ "Devi inserire il tuo codice di autenticazione e l'URL di Piwik prima che puoi "
615
+ "usare più funzioni debug."
616
+
617
+ msgid "Latest support threads on WordPress.org"
618
+ msgstr "Gli ultimi thread di supporto su WordPress.org"
619
+
620
+ msgid ""
621
+ "This will not affect Piwik itself. Resetting large networks may take some "
622
+ "minutes."
623
+ msgstr ""
624
+ "Questo non avrà affetto su Piwik stesso. Resettare grandi reti potrebbe "
625
+ "richiedere alcuni minuti."
626
+
627
+ msgid ", and all people flattering this"
628
+ msgstr ", è tutti che usano Flattr per donazioni a WP-Piwik"
629
+
630
+ msgid "Disable time limit"
631
+ msgstr "Disattivare limite del tempo"
632
+
633
+ msgid "Use set_time_limit(0) if stats page causes a time out."
634
+ msgstr ""
635
+ "Usa set_time_limit(0) nel caso che la pagina delle statistiche genera un "
636
+ "timeout."
637
+
638
+ msgid "in network mode"
639
+ msgstr "im Netzwerk-Modus"
640
+
641
+ msgid "To enable Piwik statistics, please enter"
642
+ msgstr "Per attivare le statistiche di Piwik devi inserire"
643
+
644
+ msgid ""
645
+ "your Piwik base URL (like http://mydomain.com/piwik) or your Piwik server "
646
+ "path (like /var/www/mydomain.com/httpdocs/piwik/)"
647
+ msgstr ""
648
+ "L'URL della tua installazione di Piwik (esempio: http://miosito.com/piwik) o "
649
+ "il "
650
+ "percorso server all'installazione di Piwik (esempio: "
651
+ "/var/www/miodominio.com/httpdocs/piwik/)"
652
+
653
+ msgid ""
654
+ "your personal Piwik authentification token. You can get the token on the API "
655
+ "page inside your Piwik interface. It looks like "
656
+ "&quot;1234a5cd6789e0a12345b678cd9012ef&quot;."
657
+ msgstr ""
658
+ "La chiave personale di autenticazione (Token). La chiave puoi ottenere"
659
+ "nell'interfaccia di Piwik sulla pagina API. Ha un aspetto simile a: "
660
+ "&quot;1234a5cd6789e0a12345b678cd9012ef&quot;."
661
+
662
+ msgid "No idea what I'm talking about?"
663
+ msgstr "Non ci hai capito niente?"
664
+
665
+ msgid "Get help."
666
+ msgstr "Qui ottieni aiuto."
667
+
668
+ msgid "Piwik path"
669
+ msgstr "Percorso di Piwik "
670
+
671
+ msgid "Disable cookies"
672
+ msgstr "Disattivare cookies"
673
+
674
+ msgid "Disable all tracking cookies for a visitor."
675
+ msgstr "Disattiva tutti cookie per i visitatori."
676
+
677
+ msgid "Show graph on WordPress Toolbar"
678
+ msgstr "Visualizza un grafico nella barra degli strumenti di Wordpress"
679
+
680
+ msgid "Display the last 30 days visitor stats on WordPress Toolbar."
681
+ msgstr ""
682
+ "Visualizza la statistica delle visite negli ultimi 30 giorni nella barra "
683
+ "degli strumenti di Wordpress."
684
+
685
+ msgid ""
686
+ "Graphs powered by <a href=\"http://www.jqplot.com/\">jqPlot</a> (License: GPL "
687
+ "2.0 and MIT) and <a href=\"http://omnipotent.net/jquery.sparkline/\">jQuery "
688
+ "Sparklines</a> (License: New BSD License)."
689
+ msgstr ""
690
+ "I grafici sono generati con <a href=\"http://wwwjqplot.com/\">jqPlot</a> "
691
+ "e <a href=\"http://omnipotent.net/jquery.sparkline/\">jQuery "
692
+ "Sparklines</a> (Licenza: New BSD License)."
693
+
694
+ msgid "Tabbed settings page suggested by the"
695
+ msgstr "La pagina delle impostazioni usando i tab consigliato di"
696
+
697
+ msgid ""
698
+ "If you like to use the PHP API and also to enable tracking by WP-Piwik, "
699
+ "please enter your Piwik URL, too. Otherwise your tracking code may be "
700
+ "erroneous."
701
+ msgstr ""
702
+
703
+ msgid "Title"
704
+ msgstr "Titolo"
705
+
706
+ msgid "Site ID (Piwik)"
707
+ msgstr "ID Pagina (Piwik)"
708
+
709
+ msgid "Expert Settings"
710
+ msgstr "Impostazioni per esperti"
711
+
712
+ msgid "Disable SSL peer verification"
713
+ msgstr "Disattivare verificazione Peer SSL"
714
+
715
+ msgid "not recommended"
716
+ msgstr "sconsigliato"
717
+
718
+ msgid "Invalid path. Please enter the file path to Piwik."
719
+ msgstr "Ung&uuml;ltiger Pfad. Bitte gib den Dateipfad von Piwik an."
720
+
721
+ msgid "Enable shortcodes in post or page content."
722
+ msgstr "Attiva scorciatoie nel contenuto di articoli e pagine. "
723
+
724
+
piwik.php ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require( '../../../wp-load.php' );
4
+
5
+ $arySettings = wp_piwik::loadSettings();
6
+
7
+ /* PIWIK PROXY SCRIPT */
8
+
9
+ /*
10
+ == Description ==
11
+ This script allows to track statistics using Piwik, without revealing the
12
+ Piwik Server URL. This is useful for users who track multiple websites
13
+ in the same Piwik server, but don't want to show in the source code of all tracked
14
+ websites the Piwik server URL.
15
+
16
+ == Requirements ==
17
+ To run this properly you will need
18
+ - Piwik server latest version
19
+ - One or several website(s) to track with this Piwik server, for example http://trackedsite.com
20
+ - The website to track must run on a server with PHP5 support
21
+ - In your php.ini you must check that the following is set: "allow_url_fopen = On"
22
+
23
+ == How to track trackedsite.com in your Piwik without revealing the Piwik server URL? ==
24
+
25
+ 1) In your Piwik server, login as Super user
26
+ 2) create a user, set the login for example: "UserTrackingAPI"
27
+ 3) Assign this user "admin" permission on all websites you wish to track without showing the Piwik URL
28
+ 4) Copy the "token_auth" for this user, and paste it below in this file, in $TOKEN_AUTH = "xyz"
29
+ 5) In this file, below this help test, edit $PIWIK_URL variable and change http://piwik-server.com/piwik/ with the URL to your Piwik server.
30
+ 6) Upload this modified piwik.php file in the website root directory, for example at: http://trackedsite.com/piwik.php
31
+ This file (http://trackedsite.com/piwik.php) will be called by the Piwik Javascript,
32
+ instead of calling directly the (secret) Piwik Server URL (http://piwik-server.com/piwik/).
33
+ 7) You now need to add the modified Piwik Javascript Code to the footer of your pages at http://trackedsite.com/
34
+ Go to Piwik > Settings > Websites > Show Javascript Tracking Code.
35
+ Copy the Javascript snippet. Then, edit this code and change the first lines to the following:
36
+ <script type="text/javascript">
37
+ var pkBaseURL = (("https:" == document.location.protocol) ? "https://trackedsite.com/" : "http://trackedsite.com/");
38
+ document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.php' type='text/javascript'%3E%3C/script%3E"));
39
+ </script><script type="text/javascript">
40
+ try {
41
+ var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
42
+ [...]
43
+ </script>
44
+
45
+ What's changed in this code snippet compared to the normal Piwik code?
46
+ A) the (secret) Piwik URL is now replaced by your website URL
47
+ B) the "piwik.js" becomes "piwik.php" because this piwik.php proxy script will also display and proxy the Javascript file
48
+ C) the <noscript> part of the code at the end is removed,
49
+ since it is not currently used by Piwik, and it contains the (secret) Piwik URL which you want to hide.
50
+ 8) Paste the modified Piwik Javascript code in your website "trackedsite.com" pages you wish to track.
51
+ This modified Javascript Code will then track visits/pages/conversions by calling trackedsite.com/piwik.php
52
+ which will then automatically call your (hidden) Piwik Server URL.
53
+ 9) Done!
54
+ At this stage, example.com should be tracked by your Piwik without showing the Piwik server URL.
55
+ Repeat the steps 6), 7) and 8) for each website you wish to track in Piwik.
56
+ */
57
+
58
+ // Edit the line below, and replace http://piwik-server.com/piwik/
59
+ // with your Piwik URL ending with a slash.
60
+ // This URL will never be revealed to visitors or search engines.
61
+ $PIWIK_URL = $arySettings['global']['piwik_url'];
62
+
63
+ // Edit the line below, and replace xyz by the token_auth for the user "UserTrackingAPI"
64
+ // which you created when you followed instructions above.
65
+ $TOKEN_AUTH = $arySettings['global']['piwik_token'];
66
+
67
+ // Maximum time, in seconds, to wait for the Piwik server to return the 1*1 GIF
68
+ $timeout = 5;
69
+
70
+
71
+
72
+ // DO NOT MODIFY BELOW
73
+ // ---------------------------
74
+ // 1) PIWIK.JS PROXY: No _GET parameter, we serve the JS file
75
+ if(empty($_GET))
76
+ {
77
+ $modifiedSince = false;
78
+ if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']))
79
+ {
80
+ $modifiedSince = $_SERVER['HTTP_IF_MODIFIED_SINCE'];
81
+ // strip any trailing data appended to header
82
+ if (false !== ($semicolon = strpos($modifiedSince, ';')))
83
+ {
84
+ $modifiedSince = strtotime(substr($modifiedSince, 0, $semicolon));
85
+ }
86
+ }
87
+ // Re-download the piwik.js once a day maximum
88
+ $lastModified = time()-86400;
89
+
90
+ // set HTTP response headers
91
+ header('Vary: Accept-Encoding');
92
+
93
+ // Returns 304 if not modified since
94
+ if (!empty($modifiedSince) && $modifiedSince < $lastModified)
95
+ {
96
+ header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
97
+ }
98
+ else
99
+ {
100
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
101
+ @header('Content-Type: application/javascript; charset=UTF-8');
102
+ if( $piwikJs = file_get_contents($PIWIK_URL.'piwik.js')) {
103
+ echo $piwikJs;
104
+ } else {
105
+ header($_SERVER['SERVER_PROTOCOL'] . '505 Internal server error');
106
+ }
107
+ }
108
+ exit;
109
+ }
110
+
111
+ // 2) PIWIK.PHP PROXY: GET parameters found, this is a tracking request, we redirect it to Piwik
112
+ $url = $PIWIK_URL."piwik.php?cip=".@$_SERVER['REMOTE_ADDR']."&token_auth=".$TOKEN_AUTH.'&';
113
+ foreach($_GET as $key=>$value) {
114
+ $url .= $key .'='.urlencode($value).'&';
115
+ }
116
+ header("Content-Type: image/gif");
117
+ $stream_options = array('http' => array(
118
+ 'user_agent' => @$_SERVER['HTTP_USER_AGENT'],
119
+ 'header' => "Accept-Language: " . @str_replace(array("\n","\t","\r"), "", $_SERVER['HTTP_ACCEPT_LANGUAGE']) . "\r\n" ,
120
+ 'timeout' => $timeout
121
+ ));
122
+ $ctx = stream_context_create($stream_options);
123
+ echo file_get_contents($url, 0, $ctx);
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === WP-Piwik ===
2
 
3
  Contributors: Braekling
4
- Requires at least: 3.4
5
- Tested up to: 3.4.2
6
- Stable tag: 0.9.7
7
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
8
  Tags: statistics, stats, analytics, piwik, wpmu
9
 
@@ -46,7 +46,7 @@ See section "Installation".
46
  * Graphs powered by [jqPlot](http://www.jqplot.com/) (GPL 2.0 and MIT) and and [jQuery Sparklines](http://omnipotent.net/jquery.sparkline/) (New BSD License).
47
  * Metabox support inspired by [Heiko Rabe's metabox demo plugin](http://www.code-styling.de/english/how-to-use-wordpress-metaboxes-at-own-plugins).
48
  * Translation credits see plugin settings
49
- * Donations: Marco L., Rolf W., Tobias U., Lars K., Donna F., Kevin D., Ramos S, Thomas M., the Piwik team itself, and all people flattering this.
50
  * All users who send me mails containing criticism, commendation, feature requests and bug reports - you help me to make WP-Piwik much better!
51
 
52
  Thank you all!
@@ -59,6 +59,10 @@ WP-Piwik requires Piwik. If you did not install Piwik yet, first get it at the [
59
 
60
  If Piwik works, you'll be able to configure WP-Piwik: The Piwik URL is the same URL you use to access your Piwik, e.g. for the demo site: http://demo.piwik.org. The auth token is some kind of secret password, which allows WP-Piwik to get the necessary data from Piwik. The super user's auth token, i.e. a full access password for your Piwik, can be found on Piwik's API site. You can find a detailed description [here](http://peepbo.de/board/viewtopic.php?f=5&t=10).
61
 
 
 
 
 
62
  = Tracking does not work on HostGator! =
63
 
64
  Try to enable the "avoid mod_security" option (WP-Piwik settings, Tracking tab) or create a mod_security whitelist.
@@ -110,6 +114,19 @@ Please update Piwik if not done yet (Piwik 1.9 or higher is recommended)!
110
 
111
  == Changelog ==
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  = 0.9.7 =
114
  * Shortcodes added
115
  * WP-Piwik will rename sites in Piwik if site name changes in WordPress
1
  === WP-Piwik ===
2
 
3
  Contributors: Braekling
4
+ Requires at least: 3.5
5
+ Tested up to: 3.5.1
6
+ Stable tag: 0.9.8
7
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6046779
8
  Tags: statistics, stats, analytics, piwik, wpmu
9
 
46
  * Graphs powered by [jqPlot](http://www.jqplot.com/) (GPL 2.0 and MIT) and and [jQuery Sparklines](http://omnipotent.net/jquery.sparkline/) (New BSD License).
47
  * Metabox support inspired by [Heiko Rabe's metabox demo plugin](http://www.code-styling.de/english/how-to-use-wordpress-metaboxes-at-own-plugins).
48
  * Translation credits see plugin settings
49
+ * Donations: Marco L., Rolf W., Tobias U., Lars K., Donna F., Kevin D., Ramos S, Thomas M., Andreas G., Ben M., the Piwik team itself, and all people flattering this.
50
  * All users who send me mails containing criticism, commendation, feature requests and bug reports - you help me to make WP-Piwik much better!
51
 
52
  Thank you all!
59
 
60
  If Piwik works, you'll be able to configure WP-Piwik: The Piwik URL is the same URL you use to access your Piwik, e.g. for the demo site: http://demo.piwik.org. The auth token is some kind of secret password, which allows WP-Piwik to get the necessary data from Piwik. The super user's auth token, i.e. a full access password for your Piwik, can be found on Piwik's API site. You can find a detailed description [here](http://peepbo.de/board/viewtopic.php?f=5&t=10).
61
 
62
+ = How to reset/remove all WP-Piwik settings without uninstalling? =
63
+
64
+ Login to your admin dashboard and open http://YOUR_BLOG_URL/wp-admin/options-general.php?page=wp-piwik/wp-piwik.php&tab=support&mode=resetconfirmed&full=1
65
+
66
  = Tracking does not work on HostGator! =
67
 
68
  Try to enable the "avoid mod_security" option (WP-Piwik settings, Tracking tab) or create a mod_security whitelist.
114
 
115
  == Changelog ==
116
 
117
+ = 0.9.8 =
118
+ * WordPress 3.5 compatibility fix: http://wordpress.org/support/topic/v35-errors-fix?replies=5 (Thanks Christian Foellmann!)
119
+ * Advanced Search Result Analytics, see http://piwik.org/docs/javascript-tracking/#toc-tracking-internal-search-keywords-categories-and-no-result-search-keywords
120
+ * Site Search stats added
121
+ * Use js/index.php: Replaces piwik.js and piwik.php by js/ (instead of piwik.js only)
122
+ * Connection timeout setting added
123
+ * Full reset option added
124
+ * Uninstall script added
125
+ * Stats metaboxes: Date formatted
126
+ * Use proxy settings defined in wp-config.php
127
+ * Piwik.php proxy script added (see http://piwik.org/faq/how-to/#faq_132)
128
+ * Bugfix: After upgrade, Piwik automatically places cookies again (http://wordpress.org/support/topic/after-upgrade-piwik-automatically-places-cookies-again)
129
+
130
  = 0.9.7 =
131
  * Shortcodes added
132
  * WP-Piwik will rename sites in Piwik if site name changes in WordPress
settings/.htaccess DELETED
@@ -1 +0,0 @@
1
- Deny from all
 
settings/credits.php CHANGED
@@ -1,6 +1,6 @@
1
  <tr>
2
  <td>
3
- <strong><?php _e('Thank you very much for your donation', 'wp-piwik'); ?>:</strong> Marco L., Rolf W., Tobias U., Lars K., Donna F., Kevin D., Ramos S., Thomas M., <?php _e('the Piwik team itself','wp-piwik');?><?php _e(', and all people flattering this','wp-piwik'); ?>!
4
  </td>
5
  </tr>
6
  <tr>
@@ -16,7 +16,7 @@
16
  </tr>
17
  <tr>
18
  <td>
19
- <?php _e('Thank you very much','wp-piwik'); ?>, <a href="http://blogu.programeshqip.org/">Besnik Bleta</a>, <a href="http://www.fatcow.com/">FatCow</a>, <a href="http://www.pamukkaleturkey.com/">Rene</a>, Fab, <a href="http://ezbizniz.com/">EzBizNiz</a>, Gormer, Natalya, <a href="www.aggeliopolis.gr">AggelioPolis</a><?php _e(', and', 'wp-piwik'); ?> <a href="http://wwww.webhostinggeeks.com">Web Hosting Geeks</a>, <a href="http://www.webhostingrating.com">Web Hosting Rating</a>, <a href="http://www.webhostinghub.com">Nata Strazda (Web Hosting Hub)</a>, <a href="http://www.libreoffice.ir">Hossein, LibreOffice localization team</a> <?php _e('for your translation work','wp-piwik'); ?>!
20
  </td>
21
  </tr>
22
  <tr>
1
  <tr>
2
  <td>
3
+ <strong><?php _e('Thank you very much for your donation', 'wp-piwik'); ?>:</strong> Marco L., Rolf W., Tobias U., Lars K., Donna F., Kevin D., Ramos S., Thomas M., Andreas G., Ben M., <?php _e('the Piwik team itself','wp-piwik');?><?php _e(', and all people flattering this','wp-piwik'); ?>!
4
  </td>
5
  </tr>
6
  <tr>
16
  </tr>
17
  <tr>
18
  <td>
19
+ <?php _e('Thank you very much','wp-piwik'); ?>, <a href="http://blogu.programeshqip.org/">Besnik Bleta</a>, <a href="http://www.fatcow.com/">FatCow</a>, <a href="http://www.pamukkaleturkey.com/">Rene</a>, Fab, <a href="http://ezbizniz.com/">EzBizNiz</a>, Gormer, Natalya, <a href="www.aggeliopolis.gr">AggelioPolis</a><?php _e(', and', 'wp-piwik'); ?> <a href="http://wwww.webhostinggeeks.com">Web Hosting Geeks</a>, <a href="http://www.webhostingrating.com">Web Hosting Rating</a>, <a href="http://www.webhostinghub.com">Nata Strazda (Web Hosting Hub)</a>, <a href="http://www.libreoffice.ir">Hossein, LibreOffice localization team</a> &amp; <a href="http://www.vogliaditerra.com">Ste</a> <?php _e('for your translation work','wp-piwik'); ?>!
20
  </td>
21
  </tr>
22
  <tr>
settings/piwik.php CHANGED
@@ -89,6 +89,11 @@ if (!empty(self::$aryGlobalSettings['piwik_url']) && !empty(self::$aryGlobalSett
89
  // Expert settings (cURL only)
90
  ?><tr>
91
  <th colspan="2"><strong><?php _e('Expert Settings', 'wp-piwik'); ?>:</strong></th>
 
 
 
 
 
92
  </tr>
93
  <?php if (function_exists('curl_init')) { ?>
94
  <tr>
@@ -97,7 +102,7 @@ if (!empty(self::$aryGlobalSettings['piwik_url']) && !empty(self::$aryGlobalSett
97
  <input <?php echo (self::$aryGlobalSettings['piwik_mode']=='php'?'class="wp-piwik-input-hide" ':''); ?>id="wp-piwik_disable_ssl_verify" name="wp-piwik_disable_ssl_verify" type="checkbox"<?php echo (self::$aryGlobalSettings['disable_ssl_verify']?'checked="checked"':''); ?> /> (<?php _e('not recommended','wp-piwik'); ?>)
98
  </td>
99
  </tr><tr>
100
- <th><label>User agent:</label></th>
101
  <td>
102
  <input type="radio" onchange="javascript:$j('#wp-piwik-useragent').toggleClass('readonly="readonly"');" name="wp-piwik_useragent" value="php" <?php echo (self::$aryGlobalSettings['piwik_useragent']=='php'?'checked="checked" ':''); ?>/> PHP default (<?php echo ini_get('user_agent'); ?>)
103
  </td>
@@ -109,6 +114,6 @@ if (!empty(self::$aryGlobalSettings['piwik_url']) && !empty(self::$aryGlobalSett
109
  </tr>
110
  <?php } else { ?>
111
  <tr>
112
- <td colspan="2">cURL required. See <a href="http://www.php.net/manual/curl.setup.php">PHP manual</a>.</td>
113
  </tr>
114
  <?php }
89
  // Expert settings (cURL only)
90
  ?><tr>
91
  <th colspan="2"><strong><?php _e('Expert Settings', 'wp-piwik'); ?>:</strong></th>
92
+ </tr><tr>
93
+ <th><label><?php _e('Connection timeout', 'wp-piwik'); ?>:</label></th>
94
+ <td>
95
+ <input style="width:50px;" type="text" name="wp-piwik_timeout" value="<?php echo self::$aryGlobalSettings['connection_timeout']; ?>" />
96
+ </td>
97
  </tr>
98
  <?php if (function_exists('curl_init')) { ?>
99
  <tr>
102
  <input <?php echo (self::$aryGlobalSettings['piwik_mode']=='php'?'class="wp-piwik-input-hide" ':''); ?>id="wp-piwik_disable_ssl_verify" name="wp-piwik_disable_ssl_verify" type="checkbox"<?php echo (self::$aryGlobalSettings['disable_ssl_verify']?'checked="checked"':''); ?> /> (<?php _e('not recommended','wp-piwik'); ?>)
103
  </td>
104
  </tr><tr>
105
+ <th><label><?php _e('User agent', 'wp-piwik'); ?>:</label></th>
106
  <td>
107
  <input type="radio" onchange="javascript:$j('#wp-piwik-useragent').toggleClass('readonly="readonly"');" name="wp-piwik_useragent" value="php" <?php echo (self::$aryGlobalSettings['piwik_useragent']=='php'?'checked="checked" ':''); ?>/> PHP default (<?php echo ini_get('user_agent'); ?>)
108
  </td>
114
  </tr>
115
  <?php } else { ?>
116
  <tr>
117
+ <td colspan="2"><?php _e('Further expert settings require cURL. See <a href="http://www.php.net/manual/curl.setup.php">PHP manual</a>', 'wp-piwik'); ?>.</td>
118
  </tr>
119
  <?php }
settings/sitebrowser.php CHANGED
@@ -37,8 +37,8 @@ class SiteBrowser extends WP_List_Table {
37
  global $wpdb;
38
  global $pagenow;
39
  if (is_plugin_active_for_network('wp-piwik/wp-piwik.php')) {
40
- $total_items = $wpdb->get_var( $wpdb->prepare('SELECT COUNT(*) FROM '.$wpdb->blogs));
41
- $aryBlogs = $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs.' ORDER BY blog_id LIMIT '.(($current_page-1)*$per_page).','.$per_page));
42
  foreach ($aryBlogs as $aryBlog) {
43
  $objBlog = get_blog_details($aryBlog->blog_id, true);
44
  $this->aryData[] = array(
37
  global $wpdb;
38
  global $pagenow;
39
  if (is_plugin_active_for_network('wp-piwik/wp-piwik.php')) {
40
+ $total_items = $wpdb->get_var('SELECT COUNT(*) FROM '.$wpdb->blogs);
41
+ $aryBlogs = $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs.' ORDER BY blog_id LIMIT %d,%d',(($current_page-1)*$per_page),$per_page));
42
  foreach ($aryBlogs as $aryBlog) {
43
  $objBlog = get_blog_details($aryBlog->blog_id, true);
44
  $this->aryData[] = array(
settings/support.php CHANGED
@@ -37,7 +37,7 @@
37
  case 'resetconfirmed':
38
  // Increase time limit before resetting
39
  set_time_limit(0);
40
- self::resetSettings();
41
  echo '<p class="wp-piwik-eyecatcher"><strong>'.__('WP-Piwik reset done','wp-piwik').'</strong></p>';
42
  default:
43
  }
37
  case 'resetconfirmed':
38
  // Increase time limit before resetting
39
  set_time_limit(0);
40
+ self::resetSettings((isset($_GET['full']) && $_GET['full']));
41
  echo '<p class="wp-piwik-eyecatcher"><strong>'.__('WP-Piwik reset done','wp-piwik').'</strong></p>';
42
  default:
43
  }
settings/tracking.php CHANGED
@@ -35,18 +35,35 @@ if (self::$aryGlobalSettings['add_tracking_code']) {
35
  <?php echo (is_plugin_active_for_network('wp-piwik/wp-piwik.php')?'*** SITE SPECIFIC EXAMPLE CODE ***'."\n":'').htmlentities(self::$arySettings['tracking_code']); ?>
36
  </textarea>
37
  </td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  <tr><th><?php _e('Disable cookies', 'wp-piwik'); ?>:</th><td>
39
  <input type="checkbox" value="1" id="wp-piwik_disable_cookies" name="wp-piwik_disable_cookies"<?php echo (self::$aryGlobalSettings['disable_cookies']?' checked="checked"':''); ?> />
40
  <label for="wp-piwik_disable_cookies"><?php echo _e('Disable all tracking cookies for a visitor.', 'wp-piwik'); ?></label>
41
  </td></tr>
 
 
 
 
 
 
42
  <tr><th><?php _e('Track 404', 'wp-piwik'); ?>:</th><td>
43
  <input type="checkbox" value="1" id="wp-piwik_404" name="wp-piwik_404"<?php echo (self::$aryGlobalSettings['track_404']?' checked="checked"':''); ?> />
44
  <label for="wp-piwik_404"><?php echo _e('WP-Piwik can automatically add a 404-category to track 404-page-visits.', 'wp-piwik'); ?></label>
45
  </td></tr>
46
- <tr><th><?php _e('Use js/index.php', 'wp-piwik'); ?>:</th><td>
47
- <input type="checkbox" value="1" id="wp-piwik_compress" name="wp-piwik_compress"<?php echo (self::$aryGlobalSettings['track_compress']?' checked="checked"':''); ?> />
48
- <label for="wp-piwik_compress"><?php _e('WP-Piwik can automatically use js/index.php instead of piwik.js. See', 'wp-piwik'); ?> <a href="http://demo.piwik.org/js/README">js/README</a>.</label>
49
- </td></tr>
50
  <tr><th><?php _e('Avoid mod_security', 'wp-piwik'); ?>:</th><td>
51
  <input type="checkbox" value="1" id="wp-piwik_reqpost" name="wp-piwik_reqpost"<?php echo (self::$aryGlobalSettings['track_post']?' checked="checked"':''); ?> />
52
  <label for="wp-piwik_reqpost"><?php _e('WP-Piwik can automatically force the Tracking Code to sent data in POST. See', 'wp-piwik'); ?> <a href="http://piwik.org/faq/troubleshooting/#faq_100">Piwik FAQ</a>.</label>
35
  <?php echo (is_plugin_active_for_network('wp-piwik/wp-piwik.php')?'*** SITE SPECIFIC EXAMPLE CODE ***'."\n":'').htmlentities(self::$arySettings['tracking_code']); ?>
36
  </textarea>
37
  </td></tr>
38
+
39
+ <tr><th><?php _e('Default tracking', 'wp-piwik'); ?>:</th><td>
40
+ <input type="radio" value="0" id="wp-piwik_default" name="wp-piwik_trackingmode"<?php echo (self::$aryGlobalSettings['track_mode']==0?' checked="checked"':''); ?> />
41
+ <label for="wp-piwik_compress"><?php _e('WP-Piwik uses the Piwik default tracking code.', 'wp-piwik'); ?> <a href="http://demo.piwik.org/js/README">js/README</a>.</label>
42
+ </td></tr>
43
+ <tr><th><?php _e('Use js/index.php', 'wp-piwik'); ?>:</th><td>
44
+ <input type="radio" value="1" id="wp-piwik_compress" name="wp-piwik_trackingmode"<?php echo (self::$aryGlobalSettings['track_mode']==1?' checked="checked"':''); ?> />
45
+ <label for="wp-piwik_compress"><?php _e('WP-Piwik can automatically use js/index.php instead of piwik.js and piwik.php. See', 'wp-piwik'); ?> <a href="http://demo.piwik.org/js/README">js/README</a>.</label>
46
+ </td></tr>
47
+ <tr><th><?php _e('Use proxy script', 'wp-piwik'); ?>:</th><td>
48
+ <input type="radio" value="2" id="wp-piwik_proxy" name="wp-piwik_trackingmode"<?php echo (self::$aryGlobalSettings['track_mode']==2?' checked="checked"':''); ?> />
49
+ <label for="wp-piwik_compress"><?php _e('WP-Piwik will use the piwik.php proxy script. See', 'wp-piwik'); ?> <a href="http://piwik.org/faq/how-to/#faq_132">Piwik FAQ</a>.</label>
50
+ </td></tr>
51
+
52
+
53
  <tr><th><?php _e('Disable cookies', 'wp-piwik'); ?>:</th><td>
54
  <input type="checkbox" value="1" id="wp-piwik_disable_cookies" name="wp-piwik_disable_cookies"<?php echo (self::$aryGlobalSettings['disable_cookies']?' checked="checked"':''); ?> />
55
  <label for="wp-piwik_disable_cookies"><?php echo _e('Disable all tracking cookies for a visitor.', 'wp-piwik'); ?></label>
56
  </td></tr>
57
+
58
+ <tr><th><?php _e('Track search', 'wp-piwik'); ?>:</th><td>
59
+ <input type="checkbox" value="1" id="wp-piwik_search" name="wp-piwik_search"<?php echo (self::$aryGlobalSettings['track_search']?' checked="checked"':''); ?> />
60
+ <label for="wp-piwik_search"><?php echo _e('Use Piwik\'s advanced Site Search Analytics feature. See', 'wp-piwik'); ?> <a href="http://piwik.org/docs/javascript-tracking/#toc-tracking-internal-search-keywords-categories-and-no-result-search-keywords">Piwik documentation</a>.</label>
61
+ </td></tr>
62
+
63
  <tr><th><?php _e('Track 404', 'wp-piwik'); ?>:</th><td>
64
  <input type="checkbox" value="1" id="wp-piwik_404" name="wp-piwik_404"<?php echo (self::$aryGlobalSettings['track_404']?' checked="checked"':''); ?> />
65
  <label for="wp-piwik_404"><?php echo _e('WP-Piwik can automatically add a 404-category to track 404-page-visits.', 'wp-piwik'); ?></label>
66
  </td></tr>
 
 
 
 
67
  <tr><th><?php _e('Avoid mod_security', 'wp-piwik'); ?>:</th><td>
68
  <input type="checkbox" value="1" id="wp-piwik_reqpost" name="wp-piwik_reqpost"<?php echo (self::$aryGlobalSettings['track_post']?' checked="checked"':''); ?> />
69
  <label for="wp-piwik_reqpost"><?php _e('WP-Piwik can automatically force the Tracking Code to sent data in POST. See', 'wp-piwik'); ?> <a href="http://piwik.org/faq/troubleshooting/#faq_100">Piwik FAQ</a>.</label>
settings/views.php CHANGED
@@ -49,7 +49,7 @@ if (!$bolFOpen && !$bolCURL) {
49
  <input type="checkbox" value="1" id="wp-piwik_disabletimelimit" name="wp-piwik_disabletimelimit"<?php echo (self::$aryGlobalSettings['disable_timelimit']?' checked="checked"':''); ?> />
50
  <label for="wp-piwik_disabletimelimit"><?php echo _e('Use set_time_limit(0) if stats page causes a time out.', 'wp-piwik'); ?></label>
51
  </td></tr>
52
- <tr><th><?php _e('Enable shotcodes', 'wp-piwik'); ?>:</th><td>
53
  <input type="checkbox" value="1" id="wp-piwik_shortcodes" name="wp-piwik_shortcodes"<?php echo (self::$aryGlobalSettings['shortcodes']?' checked="checked"':''); ?> />
54
  <label for="wp-piwik_shortcodes"><?php echo _e('Enable shortcodes in post or page content.', 'wp-piwik'); ?></label>
55
  </td></tr>
49
  <input type="checkbox" value="1" id="wp-piwik_disabletimelimit" name="wp-piwik_disabletimelimit"<?php echo (self::$aryGlobalSettings['disable_timelimit']?' checked="checked"':''); ?> />
50
  <label for="wp-piwik_disabletimelimit"><?php echo _e('Use set_time_limit(0) if stats page causes a time out.', 'wp-piwik'); ?></label>
51
  </td></tr>
52
+ <tr><th><?php _e('Enable shortcodes', 'wp-piwik'); ?>:</th><td>
53
  <input type="checkbox" value="1" id="wp-piwik_shortcodes" name="wp-piwik_shortcodes"<?php echo (self::$aryGlobalSettings['shortcodes']?' checked="checked"':''); ?> />
54
  <label for="wp-piwik_shortcodes"><?php echo _e('Enable shortcodes in post or page content.', 'wp-piwik'); ?></label>
55
  </td></tr>
uninstall.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Check if uninstall call is valid
4
+ if (!defined('WP_UNINSTALL_PLUGIN')) exit();
5
+
6
+ global $wpdb;
7
+
8
+ if (function_exists('is_multisite') && is_multisite()) {
9
+ delete_site_option('wp-piwik_global-settings');
10
+ $aryBlogs = $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM %s ORDER BY blog_id', $wpdb->blogs));
11
+ if (is_array($aryBlogs))
12
+ foreach ($aryBlogs as $aryBlog)
13
+ delete_blog_option($aryBlog->blog_id, 'wp-piwik_settings');
14
+ }
15
+
16
+ delete_option('wp-piwik_global-settings');
17
+ delete_option('wp-piwik_settings');
update/.htaccess DELETED
@@ -1 +0,0 @@
1
- Deny from all
 
update/90801.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ self::$aryGlobalSettings['track_search'] = false;
3
+ self::$aryGlobalSettings['connection_timeout'] = 5;
4
+ if (isset(self::$aryGlobalSettings['track_compress']) && self::$aryGlobalSettings['track_compress'])
5
+ self::$aryGlobalSettings['track_mode'] = 1;
6
+ else
7
+ self::$aryGlobalSettings['track_mode'] = 0;
8
+
9
+ if (isset(self::$aryGlobalSettings['track_compress']))
10
+ unset(self::$aryGlobalSettings['track_compress']);
wp-piwik.php CHANGED
@@ -6,12 +6,12 @@ Plugin URI: http://wordpress.org/extend/plugins/wp-piwik/
6
 
7
  Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
8
 
9
- Version: 0.9.7
10
  Author: Andr&eacute; Br&auml;kling
11
  Author URI: http://www.braekling.de
12
 
13
  ******************************************************************************************
14
- Copyright (C) 2009-2012 Andre Braekling (email: webmaster@braekling.de)
15
 
16
  This program is free software: you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
@@ -51,13 +51,13 @@ if (!function_exists('is_plugin_active_for_network'))
51
  class wp_piwik {
52
 
53
  private static
54
- $intRevisionId = 90700,
55
- $strVersion = '0.9.7',
56
  $intDashboardID = 30,
57
  $strPluginBasename = NULL,
58
  $bolJustActivated = false,
59
  $aryGlobalSettings = array(
60
- 'revision' => 90700,
61
  'add_tracking_code' => false,
62
  'last_settings_update' => 0,
63
  'piwik_token' => '',
@@ -66,6 +66,7 @@ class wp_piwik {
66
  'piwik_mode' => 'http',
67
  'piwik_useragent' => 'php',
68
  'piwik_useragent_string' => 'WP-Piwik',
 
69
  'dashboard_widget' => false,
70
  'dashboard_chart' => false,
71
  'dashboard_seo' => false,
@@ -76,8 +77,10 @@ class wp_piwik {
76
  'default_date' => 'yesterday',
77
  'auto_site_config' => true,
78
  'track_404' => false,
79
- 'track_compress' => false,
 
80
  'track_post' => false,
 
81
  'disable_timelimit' => false,
82
  'disable_ssl_verify' => false,
83
  'disable_cookies' => false,
@@ -109,6 +112,11 @@ class wp_piwik {
109
  );
110
  // Get site settings
111
  self::$arySettings = get_option('wp-piwik_settings',self::$arySettings);
 
 
 
 
 
112
  }
113
 
114
  /**
@@ -215,7 +223,17 @@ class wp_piwik {
215
  // Save upgraded or default settings
216
  self::saveSettings();
217
  // Reload settings
218
- self::loadSettings();
 
 
 
 
 
 
 
 
 
 
219
  }
220
 
221
  /**
@@ -242,6 +260,8 @@ class wp_piwik {
242
  self::includeFile('update/90601');
243
  if (self::$aryGlobalSettings['revision'] < 90700)
244
  self::includeFile('update/90700');
 
 
245
  // Install new version
246
  $this->installPlugin();
247
  }
@@ -307,13 +327,21 @@ class wp_piwik {
307
  // Update/get code if outdated/unknown
308
  if (self::$arySettings['last_tracking_code_update'] < self::$aryGlobalSettings['last_settings_update'] || empty(self::$arySettings['tracking_code'])) {
309
  $strJSCode = $this->callPiwikAPI('SitesManager.getJavascriptTag');
310
- self::$arySettings['tracking_code'] = html_entity_decode((is_string($strJSCode)?$strJSCode:'<!-- WP-Piwik ERROR: Tracking code not availbale -->'."\n"));
311
  self::$arySettings['last_tracking_code_update'] = time();
312
  self::saveSettings();
313
  }
314
  // Change code if 404
315
- if (is_404() and self::$aryGlobalSettings['track_404']) $strTrackingCode = str_replace('piwikTracker.trackPageView();', 'piwikTracker.setDocumentTitle(\'404/URL = \'+encodeURIComponent(document.location.pathname+document.location.search) + \'/From = \' + encodeURIComponent(document.referrer));piwikTracker.trackPageView();', self::$arySettings['tracking_code']);
316
- else $strTrackingCode = self::$arySettings['tracking_code'];
 
 
 
 
 
 
 
 
317
  // Send tracking code
318
  echo '<!-- *** WP-Piwik - see http://www.braekling.de/wp-piwik-wpmu-piwik-wordpress/ -->'."\n";
319
  // Add custom variables if set:
@@ -741,16 +769,26 @@ class wp_piwik {
741
  curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
742
  // Configure cURL CURLOPT_HEADER = 0
743
  curl_setopt($c, CURLOPT_HEADER, 0);
 
 
 
 
 
 
 
 
744
  // Get result
745
  $strResult = curl_exec($c);
746
  // Close connection
747
  curl_close($c);
748
  // cURL not available but url fopen allowed
749
- } elseif (ini_get('allow_url_fopen'))
 
 
750
  // Get file using file_get_contents
751
- $strResult = @file_get_contents($strURL);
752
  // Error: Not possible to get remote file
753
- else $strResult = serialize(array(
754
  'result' => 'error',
755
  'message' => 'Remote access to Piwik not possible. Enable allow_url_fopen or CURL.'
756
  ));
@@ -866,7 +904,19 @@ class wp_piwik {
866
  */
867
  function applyJSCodeChanges($strCode) {
868
  // Change code if js/index.php should be used
869
- if (self::$aryGlobalSettings['track_compress']) $strCode = str_replace('pkBaseURL + "piwik.js\'', 'pkBaseURL + "js/\'', $strCode);
 
 
 
 
 
 
 
 
 
 
 
 
870
  // Change code if POST is forced to be used
871
  if (self::$aryGlobalSettings['track_post']) $strCode = str_replace('piwikTracker.trackPageView();', 'piwikTracker.setRequestMethod(\'POST\');'."\n".' piwikTracker.trackPageView();', $strCode);
872
  // Change code if cookies are disabled
@@ -972,6 +1022,8 @@ class wp_piwik {
972
  'keywords' => array(__('Keywords', 'wp-piwik'), 'day', 'yesterday', 10),
973
  'websites' => array(__('Websites', 'wp-piwik'), 'day', 'yesterday', 10),
974
  'plugins' => array(__('Plugins', 'wp-piwik'), 'day', 'yesterday'),
 
 
975
  ),
976
  'normal' => array(
977
  'visitors' => array(__('Visitors', 'wp-piwik'), 'day', 'last30'),
@@ -1004,9 +1056,12 @@ class wp_piwik {
1004
  $intSideBoxCnt = $intContentBox = 0;
1005
  foreach ($aryDashboard['side'] as $strFile => $aryConfig) {
1006
  $intSideBoxCnt++;
 
 
 
1007
  add_meta_box(
1008
  'wp-piwik_stats-sidebox-'.$intSideBoxCnt,
1009
- $aryConfig['params']['title'].' '.($aryConfig['params']['title']!='SEO'?__($aryConfig['params']['date'], 'wp-piwik'):''),
1010
  array(&$this, 'createDashboardWidget'),
1011
  $this->intStatsPage,
1012
  'side',
@@ -1015,10 +1070,13 @@ class wp_piwik {
1015
  );
1016
  }
1017
  foreach ($aryDashboard['normal'] as $strFile => $aryConfig) {
 
 
 
1018
  $intContentBox++;
1019
  add_meta_box(
1020
  'wp-piwik_stats-contentbox-'.$intContentBox,
1021
- $aryConfig['params']['title'].' '.($aryConfig['params']['title']!='SEO'?__($aryConfig['params']['date'], 'wp-piwik'):''),
1022
  array(&$this, 'createDashboardWidget'),
1023
  $this->intStatsPage,
1024
  'normal',
@@ -1180,8 +1238,10 @@ class wp_piwik {
1180
  case 'tracking':
1181
  self::$aryGlobalSettings['add_tracking_code'] = (isset($_POST['wp-piwik_addjs'])?$_POST['wp-piwik_addjs']:false);
1182
  self::$aryGlobalSettings['track_404'] = (isset($_POST['wp-piwik_404'])?$_POST['wp-piwik_404']:false);
1183
- self::$aryGlobalSettings['track_compress'] = (isset($_POST['wp-piwik_compress'])?$_POST['wp-piwik_compress']:false);
 
1184
  self::$aryGlobalSettings['track_post'] = (isset($_POST['wp-piwik_reqpost'])?$_POST['wp-piwik_reqpost']:false);
 
1185
  self::$aryGlobalSettings['capability_stealth'] = (isset($_POST['wp-piwik_filter'])?$_POST['wp-piwik_filter']:array());
1186
  self::$aryGlobalSettings['disable_cookies'] = (isset($_POST['wp-piwik_disable_cookies'])?$_POST['wp-piwik_disable_cookies']:false);
1187
  break;
@@ -1191,6 +1251,7 @@ class wp_piwik {
1191
  self::$aryGlobalSettings['piwik_path'] = (isset($_POST['wp-piwik_path']) && !empty($_POST['wp-piwik_path'])?realpath($_POST['wp-piwik_path']):'');
1192
  self::$aryGlobalSettings['piwik_mode'] = (isset($_POST['wp-piwik_mode'])?$_POST['wp-piwik_mode']:'http');
1193
  self::$aryGlobalSettings['piwik_useragent'] = (isset($_POST['wp-piwik_useragent'])?$_POST['wp-piwik_useragent']:'php');
 
1194
  self::$aryGlobalSettings['piwik_useragent_string'] = (isset($_POST['wp-piwik_useragent_string'])?$_POST['wp-piwik_useragent_string']:'WP-Piwik');
1195
  self::$aryGlobalSettings['disable_ssl_verify'] = (isset($_POST['wp-piwik_disable_ssl_verify'])?$_POST['wp-piwik_disable_ssl_verify']:false);
1196
  if (!is_plugin_active_for_network('wp-piwik/wp-piwik.php')) {
@@ -1327,10 +1388,10 @@ class wp_piwik {
1327
  'revision' => self::$intRevisionId,
1328
  'add_tracking_code' => false,
1329
  'last_settings_update' => 0,
1330
- 'piwik_token' => ($bolFull?'':self::$aryGlobalSettings['piwik_token']),
1331
- 'piwik_url' => ($bolFull?'':self::$aryGlobalSettings['piwik_url']),
1332
- 'piwik_path' => ($bolFull?'':self::$aryGlobalSettings['piwik_path']),
1333
- 'piwik_mode' => ($bolFull?'':self::$aryGlobalSettings['piwik_mode']),
1334
  'dashboard_widget' => false,
1335
  'dashboard_chart' => false,
1336
  'dashboard_seo' => false,
@@ -1341,12 +1402,15 @@ class wp_piwik {
1341
  'default_date' => 'yesterday',
1342
  'auto_site_config' => true,
1343
  'track_404' => false,
1344
- 'track_compress' => false,
 
1345
  'track_post' => false,
 
1346
  'disable_timelimit' => false,
1347
  'disable_cookies' => false,
1348
  'toolbar' => false,
1349
  'piwik_useragent' => 'php',
 
1350
  'piwik_useragent_string' => 'WP-Piwik',
1351
  'disable_ssl_verify' => false,
1352
  'shortcodes' => false
@@ -1354,15 +1418,15 @@ class wp_piwik {
1354
  // Reset network settings
1355
  if (is_plugin_active_for_network('wp-piwik/wp-piwik.php')) {
1356
  delete_site_option('wp-piwik_global-settings');
1357
- $aryBlogs = $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM '.$wpdb->blogs.' ORDER BY blog_id'));
1358
  foreach ($aryBlogs as $aryBlog)
1359
  delete_blog_option($aryBlog->blog_id, 'wp-piwik_settings');
1360
- update_site_option('wp-piwik_global-settings', $aryKeep);
1361
  // Reset simple settings
1362
  } else {
1363
  delete_option('wp-piwik_global-settings');
1364
  delete_option('wp-piwik_settings');
1365
- update_option('wp-piwik_global-settings', $aryKeep);
1366
  }
1367
  }
1368
 
6
 
7
  Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
8
 
9
+ Version: 0.9.8
10
  Author: Andr&eacute; Br&auml;kling
11
  Author URI: http://www.braekling.de
12
 
13
  ******************************************************************************************
14
+ Copyright (C) 2009-2013 Andre Braekling (email: webmaster@braekling.de)
15
 
16
  This program is free software: you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
51
  class wp_piwik {
52
 
53
  private static
54
+ $intRevisionId = 90805,
55
+ $strVersion = '0.9.8',
56
  $intDashboardID = 30,
57
  $strPluginBasename = NULL,
58
  $bolJustActivated = false,
59
  $aryGlobalSettings = array(
60
+ 'revision' => 90805,
61
  'add_tracking_code' => false,
62
  'last_settings_update' => 0,
63
  'piwik_token' => '',
66
  'piwik_mode' => 'http',
67
  'piwik_useragent' => 'php',
68
  'piwik_useragent_string' => 'WP-Piwik',
69
+ 'connection_timeout' => 5,
70
  'dashboard_widget' => false,
71
  'dashboard_chart' => false,
72
  'dashboard_seo' => false,
77
  'default_date' => 'yesterday',
78
  'auto_site_config' => true,
79
  'track_404' => false,
80
+ 'track_search' => false,
81
+ 'track_mode' => 0,
82
  'track_post' => false,
83
+ 'track_proxy' => false,
84
  'disable_timelimit' => false,
85
  'disable_ssl_verify' => false,
86
  'disable_cookies' => false,
112
  );
113
  // Get site settings
114
  self::$arySettings = get_option('wp-piwik_settings',self::$arySettings);
115
+
116
+ return array(
117
+ 'global' => self::$aryGlobalSettings,
118
+ 'specific' => self::$arySettings
119
+ );
120
  }
121
 
122
  /**
223
  // Save upgraded or default settings
224
  self::saveSettings();
225
  // Reload settings
226
+ self::loadSettings();
227
+ }
228
+
229
+ /**
230
+ * Uninstall
231
+ */
232
+ static function uninstallPlugin() {
233
+ // Check if uninstall call is valid
234
+ if (!defined('WP_UNINSTALL_PLUGIN'))
235
+ exit();
236
+ self::resetSettings(true);
237
  }
238
 
239
  /**
260
  self::includeFile('update/90601');
261
  if (self::$aryGlobalSettings['revision'] < 90700)
262
  self::includeFile('update/90700');
263
+ if (self::$aryGlobalSettings['revision'] < 90805)
264
+ self::includeFile('update/90801');
265
  // Install new version
266
  $this->installPlugin();
267
  }
327
  // Update/get code if outdated/unknown
328
  if (self::$arySettings['last_tracking_code_update'] < self::$aryGlobalSettings['last_settings_update'] || empty(self::$arySettings['tracking_code'])) {
329
  $strJSCode = $this->callPiwikAPI('SitesManager.getJavascriptTag');
330
+ self::$arySettings['tracking_code'] = html_entity_decode((is_string($strJSCode)?$this->applyJSCodeChanges($strJSCode):'<!-- WP-Piwik ERROR: Tracking code not availbale -->'."\n"));
331
  self::$arySettings['last_tracking_code_update'] = time();
332
  self::saveSettings();
333
  }
334
  // Change code if 404
335
+ if (is_404() && self::$aryGlobalSettings['track_404'])
336
+ $strTrackingCode = str_replace('piwikTracker.trackPageView();', 'piwikTracker.setDocumentTitle(\'404/URL = \'+encodeURIComponent(document.location.pathname+document.location.search) + \'/From = \' + encodeURIComponent(document.referrer));piwikTracker.trackPageView();', self::$arySettings['tracking_code']);
337
+ // Change code if search result
338
+ elseif (is_search() && self::$aryGlobalSettings['track_search']) {
339
+ $objSearch = &new WP_Query("s=" . get_search_query() . '&showposts=-1');
340
+ $intResultCount = $objSearch->post_count;
341
+ $strTrackingCode = str_replace('piwikTracker.trackPageView();', 'piwikTracker.trackSiteSearch("'.get_search_query().'", false, '.$intResultCount.');', self::$arySettings['tracking_code']);
342
+ // Use default tracking code
343
+ } else
344
+ $strTrackingCode = self::$arySettings['tracking_code'];
345
  // Send tracking code
346
  echo '<!-- *** WP-Piwik - see http://www.braekling.de/wp-piwik-wpmu-piwik-wordpress/ -->'."\n";
347
  // Add custom variables if set:
769
  curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
770
  // Configure cURL CURLOPT_HEADER = 0
771
  curl_setopt($c, CURLOPT_HEADER, 0);
772
+ // Set cURL timeout
773
+ curl_setopt($c, CURLOPT_TIMEOUT, self::$aryGlobalSettings['connection_timeout']);
774
+ if (WP_HTTP_Proxy::is_enabled() && WP_HTTP_Proxy::send_through_proxy($strURL)) {
775
+ curl_setopt($c, CURLOPT_PROXY, WP_HTTP_Proxy::host());
776
+ curl_setopt($c, CURLOPT_PROXYPORT, WP_HTTP_Proxy::port());
777
+ if (WP_HTTP_Proxy::use_authentication())
778
+ curl_setopt($c, CURLOPT_PROXYUSERPWD, WP_HTTP_Proxy::username().':'.WP_HTTP_Proxy::password());
779
+ }
780
  // Get result
781
  $strResult = curl_exec($c);
782
  // Close connection
783
  curl_close($c);
784
  // cURL not available but url fopen allowed
785
+ } elseif (ini_get('allow_url_fopen')) {
786
+ // Set timeout
787
+ $resContext = stream_context_create(array('http'=>array('timeout' => self::$aryGlobalSettings['connection_timeout'])));
788
  // Get file using file_get_contents
789
+ $strResult = @file_get_contents($strURL, false, $strContext);
790
  // Error: Not possible to get remote file
791
+ } else $strResult = serialize(array(
792
  'result' => 'error',
793
  'message' => 'Remote access to Piwik not possible. Enable allow_url_fopen or CURL.'
794
  ));
904
  */
905
  function applyJSCodeChanges($strCode) {
906
  // Change code if js/index.php should be used
907
+ if (self::$aryGlobalSettings['track_mode'] == 1) {
908
+ $strCode = str_replace('pkBaseURL + "piwik.js\'', 'pkBaseURL + "js/\'', $strCode);
909
+ $strCode = str_replace('"piwik.php"', '"js/"', $strCode);
910
+ } elseif (self::$aryGlobalSettings['track_mode'] == 2) {
911
+ $strCode = preg_replace('/<noscript>(.*)<\/noscript>/', '', $strCode);
912
+ $strCode = str_replace('pkBaseURL + "piwik.js\'', 'pkBaseURL + "piwik.php\'', $strCode);
913
+ $strHTTP = str_replace('https://', 'http://', self::$aryGlobalSettings['piwik_url']);
914
+ $strHTTPS = str_replace('http://', 'https://', self::$aryGlobalSettings['piwik_url']);
915
+ $strProxy = str_replace('https://', 'http://', plugins_url('wp-piwik/'));
916
+ $strProxySSL = str_replace('http://', 'https://', plugins_url('wp-piwik/'));
917
+ $strCode = str_replace($strHTTP, $strProxy, $strCode);
918
+ $strCode = str_replace($strHTTPS, $strProxySSL, $strCode);
919
+ }
920
  // Change code if POST is forced to be used
921
  if (self::$aryGlobalSettings['track_post']) $strCode = str_replace('piwikTracker.trackPageView();', 'piwikTracker.setRequestMethod(\'POST\');'."\n".' piwikTracker.trackPageView();', $strCode);
922
  // Change code if cookies are disabled
1022
  'keywords' => array(__('Keywords', 'wp-piwik'), 'day', 'yesterday', 10),
1023
  'websites' => array(__('Websites', 'wp-piwik'), 'day', 'yesterday', 10),
1024
  'plugins' => array(__('Plugins', 'wp-piwik'), 'day', 'yesterday'),
1025
+ 'search' => array(__('Site Search Keywords', 'wp-piwik'), 'day', 'yesterday', 10),
1026
+ 'noresult' => array(__('Site Search without Results', 'wp-piwik'), 'day', 'yesterday', 10),
1027
  ),
1028
  'normal' => array(
1029
  'visitors' => array(__('Visitors', 'wp-piwik'), 'day', 'last30'),
1056
  $intSideBoxCnt = $intContentBox = 0;
1057
  foreach ($aryDashboard['side'] as $strFile => $aryConfig) {
1058
  $intSideBoxCnt++;
1059
+ if (preg_match('/(\d{4})(\d{2})(\d{2})/', $aryConfig['params']['date'], $aryResult))
1060
+ $strDate = $aryResult[1]."-".$aryResult[2]."-".$aryResult[3];
1061
+ else $strDate = $aryConfig['params']['date'];
1062
  add_meta_box(
1063
  'wp-piwik_stats-sidebox-'.$intSideBoxCnt,
1064
+ $aryConfig['params']['title'].' '.($aryConfig['params']['title']!='SEO'?__($strDate, 'wp-piwik'):''),
1065
  array(&$this, 'createDashboardWidget'),
1066
  $this->intStatsPage,
1067
  'side',
1070
  );
1071
  }
1072
  foreach ($aryDashboard['normal'] as $strFile => $aryConfig) {
1073
+ if (preg_match('/(\d{4})(\d{2})(\d{2})/', $aryConfig['params']['date'], $aryResult))
1074
+ $strDate = $aryResult[1]."-".$aryResult[2]."-".$aryResult[3];
1075
+ else $strDate = $aryConfig['params']['date'];
1076
  $intContentBox++;
1077
  add_meta_box(
1078
  'wp-piwik_stats-contentbox-'.$intContentBox,
1079
+ $aryConfig['params']['title'].' '.($aryConfig['params']['title']!='SEO'?__($strDate, 'wp-piwik'):''),
1080
  array(&$this, 'createDashboardWidget'),
1081
  $this->intStatsPage,
1082
  'normal',
1238
  case 'tracking':
1239
  self::$aryGlobalSettings['add_tracking_code'] = (isset($_POST['wp-piwik_addjs'])?$_POST['wp-piwik_addjs']:false);
1240
  self::$aryGlobalSettings['track_404'] = (isset($_POST['wp-piwik_404'])?$_POST['wp-piwik_404']:false);
1241
+ self::$aryGlobalSettings['track_search'] = (isset($_POST['wp-piwik_search'])?$_POST['wp-piwik_search']:false);
1242
+ self::$aryGlobalSettings['track_mode'] = (isset($_POST['wp-piwik_trackingmode'])?(int)$_POST['wp-piwik_trackingmode']:0);
1243
  self::$aryGlobalSettings['track_post'] = (isset($_POST['wp-piwik_reqpost'])?$_POST['wp-piwik_reqpost']:false);
1244
+ self::$aryGlobalSettings['track_proxy'] = (isset($_POST['wp-piwik_proxy'])?$_POST['wp-piwik_proxy']:false);
1245
  self::$aryGlobalSettings['capability_stealth'] = (isset($_POST['wp-piwik_filter'])?$_POST['wp-piwik_filter']:array());
1246
  self::$aryGlobalSettings['disable_cookies'] = (isset($_POST['wp-piwik_disable_cookies'])?$_POST['wp-piwik_disable_cookies']:false);
1247
  break;
1251
  self::$aryGlobalSettings['piwik_path'] = (isset($_POST['wp-piwik_path']) && !empty($_POST['wp-piwik_path'])?realpath($_POST['wp-piwik_path']):'');
1252
  self::$aryGlobalSettings['piwik_mode'] = (isset($_POST['wp-piwik_mode'])?$_POST['wp-piwik_mode']:'http');
1253
  self::$aryGlobalSettings['piwik_useragent'] = (isset($_POST['wp-piwik_useragent'])?$_POST['wp-piwik_useragent']:'php');
1254
+ self::$aryGlobalSettings['connection_timeout'] = (isset($_POST['wp-piwik_timeout'])?(int)$_POST['wp-piwik_timeout']:5);
1255
  self::$aryGlobalSettings['piwik_useragent_string'] = (isset($_POST['wp-piwik_useragent_string'])?$_POST['wp-piwik_useragent_string']:'WP-Piwik');
1256
  self::$aryGlobalSettings['disable_ssl_verify'] = (isset($_POST['wp-piwik_disable_ssl_verify'])?$_POST['wp-piwik_disable_ssl_verify']:false);
1257
  if (!is_plugin_active_for_network('wp-piwik/wp-piwik.php')) {
1388
  'revision' => self::$intRevisionId,
1389
  'add_tracking_code' => false,
1390
  'last_settings_update' => 0,
1391
+ 'piwik_token' => self::$aryGlobalSettings['piwik_token'],
1392
+ 'piwik_url' => self::$aryGlobalSettings['piwik_url'],
1393
+ 'piwik_path' => self::$aryGlobalSettings['piwik_path'],
1394
+ 'piwik_mode' => self::$aryGlobalSettings['piwik_mode'],
1395
  'dashboard_widget' => false,
1396
  'dashboard_chart' => false,
1397
  'dashboard_seo' => false,
1402
  'default_date' => 'yesterday',
1403
  'auto_site_config' => true,
1404
  'track_404' => false,
1405
+ 'track_search' => false,
1406
+ 'track_mode' => 0,
1407
  'track_post' => false,
1408
+ 'track_proxy' => false,
1409
  'disable_timelimit' => false,
1410
  'disable_cookies' => false,
1411
  'toolbar' => false,
1412
  'piwik_useragent' => 'php',
1413
+ 'connection_timeout' => 5,
1414
  'piwik_useragent_string' => 'WP-Piwik',
1415
  'disable_ssl_verify' => false,
1416
  'shortcodes' => false
1418
  // Reset network settings
1419
  if (is_plugin_active_for_network('wp-piwik/wp-piwik.php')) {
1420
  delete_site_option('wp-piwik_global-settings');
1421
+ $aryBlogs = $wpdb->get_results($wpdb->prepare('SELECT blog_id FROM %s ORDER BY blog_id', $wpdb->blogs));
1422
  foreach ($aryBlogs as $aryBlog)
1423
  delete_blog_option($aryBlog->blog_id, 'wp-piwik_settings');
1424
+ if (!$bolFull) update_site_option('wp-piwik_global-settings', $aryKeep);
1425
  // Reset simple settings
1426
  } else {
1427
  delete_option('wp-piwik_global-settings');
1428
  delete_option('wp-piwik_settings');
1429
+ if (!$bolFull) update_option('wp-piwik_global-settings', $aryKeep);
1430
  }
1431
  }
1432