Version Description
- Bugfix: Percent calculation fixed
- Bugfix: Visitor chart: No label overlapping if < 50 visitory/day
- Visitor chart: Added a red unique visitor average line
- Visitor table: Added a TOTAL stats line
- Pie charts: Show top 9 + "others", new color range
- Option: Show Piwik shortcut in overview box
- Some performance optimization
Download this release
Release Info
Developer | Braekling |
Plugin | WP-Matomo (WP-Piwik) |
Version | 0.7.0 |
Comparing to | |
See all releases |
Code changes from version 0.6.4 to 0.7.0
- dashboard/browsers.php +16 -6
- dashboard/overview.php +3 -0
- dashboard/screens.php +15 -6
- dashboard/systems.php +15 -6
- dashboard/visitors.php +9 -3
- languages/wp-piwik-de_DE.mo +0 -0
- languages/wp-piwik-de_DE.po +23 -0
- readme.txt +11 -2
- wp-piwik.php +7 -1
dashboard/browsers.php
CHANGED
@@ -13,11 +13,21 @@
|
|
13 |
include('header.php');
|
14 |
$strValues = $strLabels = '';
|
15 |
$intSum = 0;
|
16 |
-
foreach ($aryConf['data'] as $aryValues)
|
17 |
-
$intSum += $aryValues['nb_uniq_visitors'];
|
18 |
foreach ($aryConf['data'] as $aryValues) {
|
19 |
-
$
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
$strValues = substr($strValues, 0, -1);
|
23 |
$strLabels = substr($strLabels, 1);
|
@@ -26,7 +36,7 @@
|
|
26 |
'chs=500x220&'.
|
27 |
'chd=t:'.$strValues.'&'.
|
28 |
'chl='.$strLabels.'&'.
|
29 |
-
'chco=
|
30 |
if (self::$bolWPMU)
|
31 |
$bolDisableGAPI = get_site_option('wpmu-piwik_disable_gapi');
|
32 |
else
|
@@ -53,7 +63,7 @@
|
|
53 |
'</td><td class="n">'.
|
54 |
$aryValues['nb_uniq_visitors'].
|
55 |
'</td><td class="n">'.
|
56 |
-
number_format(
|
57 |
'%</td></tr>';
|
58 |
unset($aryTmp);
|
59 |
/***************************************************************************/ ?>
|
13 |
include('header.php');
|
14 |
$strValues = $strLabels = '';
|
15 |
$intSum = 0;
|
|
|
|
|
16 |
foreach ($aryConf['data'] as $aryValues) {
|
17 |
+
$intSum += $aryValues['nb_uniq_visitors'];
|
18 |
+
}
|
19 |
+
$intCount = 0; $intMore = 0;
|
20 |
+
foreach ($aryConf['data'] as $key => $aryValues) {
|
21 |
+
$aryConf['data'][$key]['wp_piwik_percent'] = round(($aryValues['nb_uniq_visitors']/$intSum*100), 2);
|
22 |
+
$intCount++;
|
23 |
+
if ($intCount <= 9) {
|
24 |
+
$strValues .= $aryConf['data'][$key]['wp_piwik_percent'].',';
|
25 |
+
$strLabels .= '|'.urlencode($aryValues['shortLabel']);
|
26 |
+
} else ($intMore += $aryConf['data'][$key]['wp_piwik_percent']);
|
27 |
+
}
|
28 |
+
if ($intMore) {
|
29 |
+
$strValues .= $intMore.',';
|
30 |
+
$strLabels .= '|'.__('Others', 'wp-piwik');
|
31 |
}
|
32 |
$strValues = substr($strValues, 0, -1);
|
33 |
$strLabels = substr($strLabels, 1);
|
36 |
'chs=500x220&'.
|
37 |
'chd=t:'.$strValues.'&'.
|
38 |
'chl='.$strLabels.'&'.
|
39 |
+
'chco=405A89,C0DAFF&';
|
40 |
if (self::$bolWPMU)
|
41 |
$bolDisableGAPI = get_site_option('wpmu-piwik_disable_gapi');
|
42 |
else
|
63 |
'</td><td class="n">'.
|
64 |
$aryValues['nb_uniq_visitors'].
|
65 |
'</td><td class="n">'.
|
66 |
+
number_format($aryValues['wp_piwik_percent'], 2).
|
67 |
'%</td></tr>';
|
68 |
unset($aryTmp);
|
69 |
/***************************************************************************/ ?>
|
dashboard/overview.php
CHANGED
@@ -45,6 +45,9 @@
|
|
45 |
echo '<tr><td>'.__('Max. page views in one visit', 'wp-piwik').':</td><td>'.$aryConf['data']['max_actions'].'</td></tr>';
|
46 |
echo '<tr><td>'.__('Total time spent by visitors', 'wp-piwik').':</td><td>'.$strTime.'</td></tr>';
|
47 |
echo '<tr><td>'.__('Bounce count', 'wp-piwik').':</td><td>'.$aryConf['data']['bounce_count'].'</td></tr>';
|
|
|
|
|
|
|
48 |
/***************************************************************************/ ?>
|
49 |
</tbody>
|
50 |
</table>
|
45 |
echo '<tr><td>'.__('Max. page views in one visit', 'wp-piwik').':</td><td>'.$aryConf['data']['max_actions'].'</td></tr>';
|
46 |
echo '<tr><td>'.__('Total time spent by visitors', 'wp-piwik').':</td><td>'.$strTime.'</td></tr>';
|
47 |
echo '<tr><td>'.__('Bounce count', 'wp-piwik').':</td><td>'.$aryConf['data']['bounce_count'].'</td></tr>';
|
48 |
+
if (get_option('wp-piwik_piwiklink', 0))
|
49 |
+
echo '<tr><td>'.__('Shortcut', 'wp-piwik').':</td><td><a href="'.get_option('wp-piwik_url').'">Piwik</a></td></tr>';
|
50 |
+
|
51 |
/***************************************************************************/ ?>
|
52 |
</tbody>
|
53 |
</table>
|
dashboard/screens.php
CHANGED
@@ -15,10 +15,19 @@
|
|
15 |
$intSum = 0;
|
16 |
foreach ($aryConf['data'] as $aryValues)
|
17 |
$intSum += $aryValues['nb_uniq_visitors'];
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
$strValues = substr($strValues, 0, -1);
|
23 |
$strLabels = substr($strLabels, 1);
|
24 |
$strBase = 'http://chart.apis.google.com/chart?'.
|
@@ -26,7 +35,7 @@
|
|
26 |
'chs=500x220&'.
|
27 |
'chd=t:'.$strValues.'&'.
|
28 |
'chl='.$strLabels.'&'.
|
29 |
-
'chco=
|
30 |
if (self::$bolWPMU)
|
31 |
$bolDisableGAPI = get_site_option('wpmu-piwik_disable_gapi');
|
32 |
else
|
@@ -53,7 +62,7 @@
|
|
53 |
'</td><td class="n">'.
|
54 |
$aryValues['nb_uniq_visitors'].
|
55 |
'</td><td class="n">'.
|
56 |
-
number_format(
|
57 |
'%</td></tr>';
|
58 |
unset($aryTmp);
|
59 |
/***************************************************************************/ ?>
|
15 |
$intSum = 0;
|
16 |
foreach ($aryConf['data'] as $aryValues)
|
17 |
$intSum += $aryValues['nb_uniq_visitors'];
|
18 |
+
$intCount = 0; $intMore = 0;
|
19 |
+
foreach ($aryConf['data'] as $key => $aryValues) {
|
20 |
+
$aryConf['data'][$key]['wp_piwik_percent'] = round(($aryValues['nb_uniq_visitors']/$intSum*100), 2);
|
21 |
+
$intCount++;
|
22 |
+
if ($intCount <= 9) {
|
23 |
+
$strValues .= $aryConf['data'][$key]['wp_piwik_percent'].',';
|
24 |
+
$strLabels .= '|'.urlencode($aryValues['label']);
|
25 |
+
} else ($intMore += $aryConf['data'][$key]['wp_piwik_percent']);
|
26 |
+
}
|
27 |
+
if ($intMore) {
|
28 |
+
$strValues .= $intMore.',';
|
29 |
+
$strLabels .= '|'.__('Others', 'wp-piwik');
|
30 |
+
}
|
31 |
$strValues = substr($strValues, 0, -1);
|
32 |
$strLabels = substr($strLabels, 1);
|
33 |
$strBase = 'http://chart.apis.google.com/chart?'.
|
35 |
'chs=500x220&'.
|
36 |
'chd=t:'.$strValues.'&'.
|
37 |
'chl='.$strLabels.'&'.
|
38 |
+
'chco=405A89,C0DAFF&';
|
39 |
if (self::$bolWPMU)
|
40 |
$bolDisableGAPI = get_site_option('wpmu-piwik_disable_gapi');
|
41 |
else
|
62 |
'</td><td class="n">'.
|
63 |
$aryValues['nb_uniq_visitors'].
|
64 |
'</td><td class="n">'.
|
65 |
+
number_format($aryValues['wp_piwik_percent'], 2).
|
66 |
'%</td></tr>';
|
67 |
unset($aryTmp);
|
68 |
/***************************************************************************/ ?>
|
dashboard/systems.php
CHANGED
@@ -15,10 +15,19 @@
|
|
15 |
$intSum = 0;
|
16 |
foreach ($aryConf['data'] as $aryValues)
|
17 |
$intSum += $aryValues['nb_uniq_visitors'];
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
$strValues = substr($strValues, 0, -1);
|
23 |
$strLabels = substr($strLabels, 1);
|
24 |
$strBase = 'http://chart.apis.google.com/chart?'.
|
@@ -26,7 +35,7 @@
|
|
26 |
'chs=500x220&'.
|
27 |
'chd=t:'.$strValues.'&'.
|
28 |
'chl='.$strLabels.'&'.
|
29 |
-
'chco=
|
30 |
if (self::$bolWPMU)
|
31 |
$bolDisableGAPI = get_site_option('wpmu-piwik_disable_gapi');
|
32 |
else
|
@@ -53,7 +62,7 @@
|
|
53 |
'</td><td class="n">'.
|
54 |
$aryValues['nb_uniq_visitors'].
|
55 |
'</td><td class="n">'.
|
56 |
-
number_format(
|
57 |
'%</td></tr>';
|
58 |
unset($aryTmp);
|
59 |
/***************************************************************************/ ?>
|
15 |
$intSum = 0;
|
16 |
foreach ($aryConf['data'] as $aryValues)
|
17 |
$intSum += $aryValues['nb_uniq_visitors'];
|
18 |
+
$intCount = 0; $intMore = 0;
|
19 |
+
foreach ($aryConf['data'] as $key => $aryValues) {
|
20 |
+
$aryConf['data'][$key]['wp_piwik_percent'] = round(($aryValues['nb_uniq_visitors']/$intSum*100), 2);
|
21 |
+
$intCount++;
|
22 |
+
if ($intCount <= 9) {
|
23 |
+
$strValues .= $aryConf['data'][$key]['wp_piwik_percent'].',';
|
24 |
+
$strLabels .= '|'.urlencode($aryValues['label']);
|
25 |
+
} else ($intMore += $aryConf['data'][$key]['wp_piwik_percent']);
|
26 |
+
}
|
27 |
+
if ($intMore) {
|
28 |
+
$strValues .= $intMore.',';
|
29 |
+
$strLabels .= '|'.__('Others', 'wp-piwik');
|
30 |
+
}
|
31 |
$strValues = substr($strValues, 0, -1);
|
32 |
$strLabels = substr($strLabels, 1);
|
33 |
$strBase = 'http://chart.apis.google.com/chart?'.
|
35 |
'chs=500x220&'.
|
36 |
'chd=t:'.$strValues.'&'.
|
37 |
'chl='.$strLabels.'&'.
|
38 |
+
'chco=405A89,C0DAFF&';
|
39 |
if (self::$bolWPMU)
|
40 |
$bolDisableGAPI = get_site_option('wpmu-piwik_disable_gapi');
|
41 |
else
|
62 |
'</td><td class="n">'.
|
63 |
$aryValues['nb_uniq_visitors'].
|
64 |
'</td><td class="n">'.
|
65 |
+
number_format($aryValues['wp_piwik_percent'], 2).
|
66 |
'%</td></tr>';
|
67 |
unset($aryTmp);
|
68 |
/***************************************************************************/ ?>
|
dashboard/visitors.php
CHANGED
@@ -27,13 +27,18 @@
|
|
27 |
$intMax = max($aryConf['data']['Visitors']);
|
28 |
while ($intMax % 10 != 0 || $intMax == 0) $intMax++;
|
29 |
$intStep = $intMax / 5;
|
30 |
-
|
|
|
|
|
31 |
foreach ($aryConf['data']['Visitors'] as $strDate => $intValue) {
|
32 |
$strValues .= round($intValue/($intMax/100),2).',';
|
33 |
$strValuesU .= round($aryConf['data']['Unique'][$strDate]/($intMax/100),2).',';
|
34 |
$strBounced .= round($aryConf['data']['Bounced'][$strDate]/($intMax/100),2).',';
|
35 |
$strLabels .= '|'.substr($strDate,-2);
|
|
|
36 |
}
|
|
|
|
|
37 |
$strValues = substr($strValues, 0, -1);
|
38 |
$strValuesU = substr($strValuesU, 0, -1);
|
39 |
$strBounced = substr($strBounced, 0, -1);
|
@@ -41,9 +46,9 @@
|
|
41 |
$strGraph = 'cht=lc&'.
|
42 |
'chg=0,'.round($intStep/($intMax/100),2).',2,2&'.
|
43 |
'chs=500x220&'.
|
44 |
-
'chd=t:'.$strValues.'|'.$strValuesU.'|'.$strBounced.'&'.
|
45 |
'chxl=0:'.$strLabels.'&'.
|
46 |
-
'chco=90AAD9,A0BAE9,E9A0BA&'.
|
47 |
'chm=B,D4E2ED,0,1,0|B,E4F2FD,1,2,0|B,FDE4F2,2,3,0&'.
|
48 |
'chxt=x,y&'.
|
49 |
'chxr=1,0,'.$intMax.','.$intStep;
|
@@ -76,6 +81,7 @@
|
|
76 |
'</td><td class="n">'.
|
77 |
$aryConf['data']['Bounced'][$strDate].
|
78 |
'</td></tr>'."\n";
|
|
|
79 |
unset($aryTmp);
|
80 |
/***************************************************************************/ ?>
|
81 |
</tbody>
|
27 |
$intMax = max($aryConf['data']['Visitors']);
|
28 |
while ($intMax % 10 != 0 || $intMax == 0) $intMax++;
|
29 |
$intStep = $intMax / 5;
|
30 |
+
if ($intStep < 10) $intStep = 10;
|
31 |
+
else while ($intStep % 10 != 0 && $intStep != 1) $intStep--;
|
32 |
+
$intUSum = 0;
|
33 |
foreach ($aryConf['data']['Visitors'] as $strDate => $intValue) {
|
34 |
$strValues .= round($intValue/($intMax/100),2).',';
|
35 |
$strValuesU .= round($aryConf['data']['Unique'][$strDate]/($intMax/100),2).',';
|
36 |
$strBounced .= round($aryConf['data']['Bounced'][$strDate]/($intMax/100),2).',';
|
37 |
$strLabels .= '|'.substr($strDate,-2);
|
38 |
+
$intUSum += $aryConf['data']['Unique'][$strDate];
|
39 |
}
|
40 |
+
$intAvg = round($intUSum/30,0);
|
41 |
+
$intAvgG = round($intAvg/($intMax/100),2);
|
42 |
$strValues = substr($strValues, 0, -1);
|
43 |
$strValuesU = substr($strValuesU, 0, -1);
|
44 |
$strBounced = substr($strBounced, 0, -1);
|
46 |
$strGraph = 'cht=lc&'.
|
47 |
'chg=0,'.round($intStep/($intMax/100),2).',2,2&'.
|
48 |
'chs=500x220&'.
|
49 |
+
'chd=t:'.$strValues.'|'.$strValuesU.'|'.$strBounced.'|'.$intAvgG.','.$intAvgG.'&'.
|
50 |
'chxl=0:'.$strLabels.'&'.
|
51 |
+
'chco=90AAD9,A0BAE9,E9A0BA,FF0000&'.
|
52 |
'chm=B,D4E2ED,0,1,0|B,E4F2FD,1,2,0|B,FDE4F2,2,3,0&'.
|
53 |
'chxt=x,y&'.
|
54 |
'chxr=1,0,'.$intMax.','.$intStep;
|
81 |
'</td><td class="n">'.
|
82 |
$aryConf['data']['Bounced'][$strDate].
|
83 |
'</td></tr>'."\n";
|
84 |
+
echo '<tr><td class="n" colspan="4"><strong>'.__('Unique TOTAL', 'wp-piwik').'</strong> '.__('Sum', 'wp-piwik').': '.$intUSum.' '.__('Avg', 'wp-piwik').': '.$intAvg.'</td></tr>';
|
85 |
unset($aryTmp);
|
86 |
/***************************************************************************/ ?>
|
87 |
</tbody>
|
languages/wp-piwik-de_DE.mo
CHANGED
Binary file
|
languages/wp-piwik-de_DE.po
CHANGED
@@ -19,12 +19,33 @@ msgstr ""
|
|
19 |
msgid "Browser"
|
20 |
msgstr "Browser"
|
21 |
|
|
|
|
|
|
|
22 |
msgid "Resolution"
|
23 |
msgstr "Auflösung"
|
24 |
|
25 |
msgid "Operating System"
|
26 |
msgstr "Betriebssystem"
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
#: dashboard/browsers.php:37 dashboard/keywords.php:13
|
29 |
#: dashboard/visitors.php:56 dashboard/websites.php:13
|
30 |
msgid "Unique"
|
@@ -252,3 +273,5 @@ msgstr "Ja"
|
|
252 |
msgid "Show overview on WordPress dashboard"
|
253 |
msgstr "Übersicht auf WordPress Dashboard anzeigen"
|
254 |
|
|
|
|
19 |
msgid "Browser"
|
20 |
msgstr "Browser"
|
21 |
|
22 |
+
msgid "Others"
|
23 |
+
msgstr "Andere"
|
24 |
+
|
25 |
msgid "Resolution"
|
26 |
msgstr "Auflösung"
|
27 |
|
28 |
msgid "Operating System"
|
29 |
msgstr "Betriebssystem"
|
30 |
|
31 |
+
msgid "Shortcut"
|
32 |
+
msgstr "Verknüpfung"
|
33 |
+
|
34 |
+
msgid "Advertisement"
|
35 |
+
msgstr "Werbung"
|
36 |
+
|
37 |
+
msgid "Looking for premium themes? Visit "
|
38 |
+
msgstr "Suchst Du Premium-Themes? Besuche "
|
39 |
+
|
40 |
+
msgid "Avg"
|
41 |
+
msgstr "Schnitt"
|
42 |
+
|
43 |
+
msgid "Sum"
|
44 |
+
msgstr "Summe"
|
45 |
+
|
46 |
+
msgid "Unique TOTAL"
|
47 |
+
msgstr "Eindeutige Besucher TOTAL"
|
48 |
+
|
49 |
#: dashboard/browsers.php:37 dashboard/keywords.php:13
|
50 |
#: dashboard/visitors.php:56 dashboard/websites.php:13
|
51 |
msgid "Unique"
|
273 |
msgid "Show overview on WordPress dashboard"
|
274 |
msgstr "Übersicht auf WordPress Dashboard anzeigen"
|
275 |
|
276 |
+
msgid "Show Piwik link in overview"
|
277 |
+
msgstr "Piwik-Link in Übersicht anzeigen"
|
readme.txt
CHANGED
@@ -4,9 +4,9 @@ Contributors: braekling
|
|
4 |
|
5 |
Requires at least: 2.7
|
6 |
|
7 |
-
Tested up to:
|
8 |
|
9 |
-
Stable tag: 0.
|
10 |
|
11 |
Donate link: http://www.amazon.de/gp/registry/wishlist/111VUJT4HP1RA?reveal=unpurchased&filter=all&sort=priority&layout=standard&x=12&y=14
|
12 |
Tags: statistics, stats, analytics, piwik, wpmu
|
@@ -71,6 +71,15 @@ Thank you, guys!
|
|
71 |
|
72 |
== Changelog ==
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
= 0.6.4 =
|
75 |
* Unnecessary debug output removed
|
76 |
* German language file update
|
4 |
|
5 |
Requires at least: 2.7
|
6 |
|
7 |
+
Tested up to: 3.0.0
|
8 |
|
9 |
+
Stable tag: 0.7.0
|
10 |
|
11 |
Donate link: http://www.amazon.de/gp/registry/wishlist/111VUJT4HP1RA?reveal=unpurchased&filter=all&sort=priority&layout=standard&x=12&y=14
|
12 |
Tags: statistics, stats, analytics, piwik, wpmu
|
71 |
|
72 |
== Changelog ==
|
73 |
|
74 |
+
= 0.7.0 =
|
75 |
+
* Bugfix: Percent calculation fixed
|
76 |
+
* Bugfix: Visitor chart: No label overlapping if < 50 visitory/day
|
77 |
+
* Visitor chart: Added a red unique visitor average line
|
78 |
+
* Visitor table: Added a TOTAL stats line
|
79 |
+
* Pie charts: Show top 9 + "others", new color range
|
80 |
+
* Option: Show Piwik shortcut in overview box
|
81 |
+
* Some performance optimization
|
82 |
+
|
83 |
= 0.6.4 =
|
84 |
* Unnecessary debug output removed
|
85 |
* German language file update
|
wp-piwik.php
CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://www.braekling.de/wp-piwik-wpmu-piwik-wordpress/
|
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
-
Version: 0.
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
@@ -403,6 +403,7 @@ class wp_piwik {
|
|
403 |
update_option('wp-piwik_displayto', $_POST['wp-piwik_displayto'],'');
|
404 |
update_option('wp-piwik_disable_gapi', $_POST['wp-piwik_disable_gapi'],'');
|
405 |
update_option('wp-piwik_dbwidget', $_POST['wp-piwik_dbwidget'], 0);
|
|
|
406 |
}
|
407 |
|
408 |
function show_settings() {
|
@@ -468,6 +469,7 @@ class wp_piwik {
|
|
468 |
$intAddJS = get_option('wp-piwik_addjs');
|
469 |
$intDisableGAPI = get_option('wp-piwik_disable_gapi');
|
470 |
$intDashboardWidget = get_option('wp-piwik_dbwidget');
|
|
|
471 |
$strJavaScript = $this->call_API('SitesManager.getJavascriptTag');
|
472 |
if ($intAddJS)
|
473 |
update_option('wp-piwik_jscode', $strJavaScript);
|
@@ -493,6 +495,9 @@ class wp_piwik {
|
|
493 |
'<option value="2"'.($intDashboardWidget == 2?' selected=""':'').'>'.__('Yes','wp-piwik').' ('.__('today', 'wp-piwik').').</option>'.
|
494 |
'<option value="3"'.($intDashboardWidget == 3?' selected=""':'').'>'.__('Yes','wp-piwik').' ('.__('last 30 days','wp-piwik').').</option>'.
|
495 |
'</select></td></tr>';
|
|
|
|
|
|
|
496 |
global $wp_roles;
|
497 |
echo '<tr><td>'.__('Tracking filter', 'wp-piwik').':</td><td>';
|
498 |
$aryFilter = get_option('wp-piwik_filter');
|
@@ -524,6 +529,7 @@ class wp_piwik {
|
|
524 |
<input type="submit" name="Submit" value="<?php _e('Save settings', 'wp-piwik') ?>" />
|
525 |
</p>
|
526 |
</form>
|
|
|
527 |
</div>
|
528 |
<?php $this->credits(); ?>
|
529 |
</div>
|
6 |
|
7 |
Description: Adds Piwik stats to your dashboard menu and Piwik code to your wordpress footer.
|
8 |
|
9 |
+
Version: 0.7.0
|
10 |
Author: André Bräkling
|
11 |
Author URI: http://www.braekling.de
|
12 |
|
403 |
update_option('wp-piwik_displayto', $_POST['wp-piwik_displayto'],'');
|
404 |
update_option('wp-piwik_disable_gapi', $_POST['wp-piwik_disable_gapi'],'');
|
405 |
update_option('wp-piwik_dbwidget', $_POST['wp-piwik_dbwidget'], 0);
|
406 |
+
update_option('wp-piwik_piwiklink', $_POST['wp-piwik_piwiklink'], 0);
|
407 |
}
|
408 |
|
409 |
function show_settings() {
|
469 |
$intAddJS = get_option('wp-piwik_addjs');
|
470 |
$intDisableGAPI = get_option('wp-piwik_disable_gapi');
|
471 |
$intDashboardWidget = get_option('wp-piwik_dbwidget');
|
472 |
+
$intShowLink = get_option('wp-piwik_piwiklink');
|
473 |
$strJavaScript = $this->call_API('SitesManager.getJavascriptTag');
|
474 |
if ($intAddJS)
|
475 |
update_option('wp-piwik_jscode', $strJavaScript);
|
495 |
'<option value="2"'.($intDashboardWidget == 2?' selected=""':'').'>'.__('Yes','wp-piwik').' ('.__('today', 'wp-piwik').').</option>'.
|
496 |
'<option value="3"'.($intDashboardWidget == 3?' selected=""':'').'>'.__('Yes','wp-piwik').' ('.__('last 30 days','wp-piwik').').</option>'.
|
497 |
'</select></td></tr>';
|
498 |
+
echo '<tr><td>'.__('Show Piwik link in overview', 'wp-piwik').':</td><td>'.
|
499 |
+
'<input type="checkbox" value="1" name="wp-piwik_piwiklink" '.
|
500 |
+
($intShowLink?' checked="checked"':"").'/></td></tr>';
|
501 |
global $wp_roles;
|
502 |
echo '<tr><td>'.__('Tracking filter', 'wp-piwik').':</td><td>';
|
503 |
$aryFilter = get_option('wp-piwik_filter');
|
529 |
<input type="submit" name="Submit" value="<?php _e('Save settings', 'wp-piwik') ?>" />
|
530 |
</p>
|
531 |
</form>
|
532 |
+
<p><strong><?php _e('Advertisement', 'wp-piwik'); ?>:</strong> <?php _e('Looking for premium themes? Visit ', 'wp-piwik'); ?> <a href="https://www.e-junkie.com/ecom/gb.php?cl=55482&c=ib&aff=103060">RichWP</a>.</p>
|
533 |
</div>
|
534 |
<?php $this->credits(); ?>
|
535 |
</div>
|