Version Description
Download this release
Release Info
Developer | matomoteam |
Plugin | Matomo Analytics – Ethical Stats. Powerful Insights. |
Version | 1.1.3 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.3
- app/bootstrap.php +23 -3
- app/libs/Zend/Session.php +0 -7
- classes/WpMatomo/Admin/SystemReport.php +39 -4
- classes/WpMatomo/Admin/views/get_started.php +1 -0
- classes/WpMatomo/Admin/views/marketplace.php +78 -76
- classes/WpMatomo/Admin/views/tracking.php +2 -2
- classes/WpMatomo/Ecommerce/Woocommerce.php +18 -0
- classes/WpMatomo/Installer.php +3 -3
- classes/WpMatomo/Site/Sync.php +15 -4
- classes/WpMatomo/TrackingCode/TrackingCodeGenerator.php +3 -3
- config/common.config.ini.php +3 -0
- matomo.php +1 -1
- plugins/WordPress/WordPress.php +10 -1
- readme.txt +27 -3
app/bootstrap.php
CHANGED
@@ -24,6 +24,14 @@ if ( ! defined( 'PIWIK_ENABLE_ERROR_HANDLER' ) ) {
|
|
24 |
|
25 |
$GLOBALS['MATOMO_LOADED_DIRECTLY'] = ! defined( 'ABSPATH' );
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
if (!function_exists('matomo_log_message_no_display')) {
|
28 |
function matomo_log_message_no_display($message)
|
29 |
{
|
@@ -79,20 +87,31 @@ if ( $GLOBALS['MATOMO_LOADED_DIRECTLY'] ) {
|
|
79 |
}
|
80 |
|
81 |
if (!empty($_SERVER['MATOMO_WP_ROOT_PATH']) && file_exists( rtrim($_SERVER['MATOMO_WP_ROOT_PATH'], '/') . '/wp-load.php')) {
|
82 |
-
|
83 |
-
|
|
|
|
|
|
|
84 |
require_once $matomo_wpload_full;
|
85 |
} elseif (realpath( $matomo_wpload_full ) && file_exists(realpath( $matomo_wpload_full ))) {
|
|
|
|
|
86 |
require_once realpath( $matomo_wpload_full );
|
87 |
} elseif (!empty($_SERVER['SCRIPT_FILENAME']) && file_exists($_SERVER['SCRIPT_FILENAME'])) {
|
88 |
// seems symlinked... eg the wp-content dir or wp-content/plugins dir is symlinked from some very much other place...
|
89 |
$matomo_wpload_full = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $matomo_wpload_base;
|
90 |
if ( file_exists($matomo_wpload_full ) ) {
|
|
|
|
|
91 |
require_once $matomo_wpload_full;
|
92 |
} elseif (realpath( $matomo_wpload_full ) && file_exists(realpath( $matomo_wpload_full ))) {
|
|
|
93 |
require_once realpath( $matomo_wpload_full );
|
94 |
} elseif (file_exists(dirname(dirname(dirname(dirname(dirname( $_SERVER['SCRIPT_FILENAME'] ))))) . '/wp-load.php')) {
|
95 |
-
|
|
|
|
|
|
|
96 |
}
|
97 |
}
|
98 |
|
@@ -108,6 +127,7 @@ if ( $GLOBALS['MATOMO_LOADED_DIRECTLY'] ) {
|
|
108 |
if (strpos($matomo_wpload_content, DIRECTORY_SEPARATOR) === 0) {
|
109 |
$matomo_wpload_file = rtrim($matomo_wpload_content, DIRECTORY_SEPARATOR) . '/wp-load.php';
|
110 |
if (file_exists($matomo_wpload_file) && is_readable($matomo_wpload_file)) {
|
|
|
111 |
require_once $matomo_wpload_file;
|
112 |
}
|
113 |
}
|
24 |
|
25 |
$GLOBALS['MATOMO_LOADED_DIRECTLY'] = ! defined( 'ABSPATH' );
|
26 |
|
27 |
+
if (!function_exists('matomo_ch_dir')) {
|
28 |
+
function matomo_ch_dir($file) {
|
29 |
+
if (function_exists('chdir') && is_dir(dirname($file))) {
|
30 |
+
@chdir(dirname($file));
|
31 |
+
}
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
if (!function_exists('matomo_log_message_no_display')) {
|
36 |
function matomo_log_message_no_display($message)
|
37 |
{
|
87 |
}
|
88 |
|
89 |
if (!empty($_SERVER['MATOMO_WP_ROOT_PATH']) && file_exists( rtrim($_SERVER['MATOMO_WP_ROOT_PATH'], '/') . '/wp-load.php')) {
|
90 |
+
$matomo_wp_root_file = rtrim($_SERVER['MATOMO_WP_ROOT_PATH'], '/') . '/wp-load.php';
|
91 |
+
matomo_ch_dir($matomo_wp_root_file);
|
92 |
+
require_once $matomo_wp_root_file;
|
93 |
+
} elseif (file_exists($matomo_wpload_full ) ) {
|
94 |
+
matomo_ch_dir($matomo_wpload_full);
|
95 |
require_once $matomo_wpload_full;
|
96 |
} elseif (realpath( $matomo_wpload_full ) && file_exists(realpath( $matomo_wpload_full ))) {
|
97 |
+
matomo_ch_dir(realpath( $matomo_wpload_full ));
|
98 |
+
|
99 |
require_once realpath( $matomo_wpload_full );
|
100 |
} elseif (!empty($_SERVER['SCRIPT_FILENAME']) && file_exists($_SERVER['SCRIPT_FILENAME'])) {
|
101 |
// seems symlinked... eg the wp-content dir or wp-content/plugins dir is symlinked from some very much other place...
|
102 |
$matomo_wpload_full = dirname($_SERVER['SCRIPT_FILENAME']) . '/' . $matomo_wpload_base;
|
103 |
if ( file_exists($matomo_wpload_full ) ) {
|
104 |
+
matomo_ch_dir($matomo_wpload_full);
|
105 |
+
|
106 |
require_once $matomo_wpload_full;
|
107 |
} elseif (realpath( $matomo_wpload_full ) && file_exists(realpath( $matomo_wpload_full ))) {
|
108 |
+
matomo_ch_dir(realpath( $matomo_wpload_full ));
|
109 |
require_once realpath( $matomo_wpload_full );
|
110 |
} elseif (file_exists(dirname(dirname(dirname(dirname(dirname( $_SERVER['SCRIPT_FILENAME'] ))))) . '/wp-load.php')) {
|
111 |
+
$matomo_relative_path = dirname(dirname(dirname(dirname(dirname( $_SERVER['SCRIPT_FILENAME'] ))))) . '/wp-load.php';
|
112 |
+
|
113 |
+
matomo_ch_dir($matomo_relative_path);
|
114 |
+
require_once $matomo_relative_path;
|
115 |
}
|
116 |
}
|
117 |
|
127 |
if (strpos($matomo_wpload_content, DIRECTORY_SEPARATOR) === 0) {
|
128 |
$matomo_wpload_file = rtrim($matomo_wpload_content, DIRECTORY_SEPARATOR) . '/wp-load.php';
|
129 |
if (file_exists($matomo_wpload_file) && is_readable($matomo_wpload_file)) {
|
130 |
+
matomo_ch_dir($matomo_wpload_file);
|
131 |
require_once $matomo_wpload_file;
|
132 |
}
|
133 |
}
|
app/libs/Zend/Session.php
CHANGED
@@ -478,13 +478,6 @@ class Zend_Session extends Zend_Session_Abstract
|
|
478 |
. " output started in {$filename}/{$linenum}");
|
479 |
}
|
480 |
|
481 |
-
// See http://www.php.net/manual/en/ref.session.php for explanation
|
482 |
-
if (!self::$_unitTestEnabled && defined('SID')) {
|
483 |
-
/** @see Zend_Session_Exception */
|
484 |
-
// require_once 'Zend/Session/Exception.php';
|
485 |
-
throw new Zend_Session_Exception('session has already been started by session.auto-start or session_start()');
|
486 |
-
}
|
487 |
-
|
488 |
/**
|
489 |
* Hack to throw exceptions on start instead of php errors
|
490 |
* @see http://framework.zend.com/issues/browse/ZF-1325
|
478 |
. " output started in {$filename}/{$linenum}");
|
479 |
}
|
480 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
/**
|
482 |
* Hack to throw exceptions on start instead of php errors
|
483 |
* @see http://framework.zend.com/issues/browse/ZF-1325
|
classes/WpMatomo/Admin/SystemReport.php
CHANGED
@@ -279,7 +279,8 @@ class SystemReport {
|
|
279 |
private function get_matomo_info() {
|
280 |
$rows = array();
|
281 |
|
282 |
-
$plugin_data
|
|
|
283 |
|
284 |
$rows[] = array(
|
285 |
'name' => esc_html__( 'Matomo Plugin Version', 'matomo' ),
|
@@ -356,10 +357,15 @@ class SystemReport {
|
|
356 |
'comment' => '',
|
357 |
);
|
358 |
|
|
|
|
|
|
|
|
|
|
|
359 |
$rows[] = array(
|
360 |
'name' => esc_html__( 'Matomo Install Version', 'matomo' ),
|
361 |
'value' => get_option(Installer::OPTION_NAME_INSTALL_VERSION),
|
362 |
-
'comment' =>
|
363 |
);
|
364 |
|
365 |
$rows[] = array(
|
@@ -443,6 +449,7 @@ class SystemReport {
|
|
443 |
);
|
444 |
}
|
445 |
|
|
|
446 |
if ( ! \WpMatomo::is_safe_mode() && $report ) {
|
447 |
$rows[] = array(
|
448 |
'section' => esc_html__( 'Mandatory checks', 'matomo' ),
|
@@ -456,10 +463,11 @@ class SystemReport {
|
|
456 |
$rows = $this->add_diagnostic_results( $rows, $report->getOptionalDiagnosticResults() );
|
457 |
|
458 |
$cli_multi = new CliMulti();
|
|
|
459 |
|
460 |
$rows[] = array(
|
461 |
'name' => 'Supports Async Archiving',
|
462 |
-
'value' => $
|
463 |
'comment' => '',
|
464 |
);
|
465 |
|
@@ -560,13 +568,40 @@ class SystemReport {
|
|
560 |
);
|
561 |
|
562 |
$error_log_entries = $this->logger->get_last_logged_entries();
|
|
|
563 |
if ( ! empty( $error_log_entries ) ) {
|
|
|
564 |
foreach ( $error_log_entries as $error ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
$error['value'] = $this->convert_time_to_date( $error['value'], true, false );
|
566 |
$error['is_warning'] = !empty($error['name']) && stripos($error['name'], 'archiv') !== false && $error['name'] !== 'archive_boot';
|
567 |
$error['comment'] = matomo_anonymize_value($error['comment']);
|
568 |
$rows[] = $error;
|
569 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
570 |
} else {
|
571 |
$rows[] = array(
|
572 |
'name' => __('None', 'matomo'),
|
@@ -618,7 +653,7 @@ class SystemReport {
|
|
618 |
return esc_html__( 'Unknown', 'matomo' );
|
619 |
}
|
620 |
|
621 |
-
$date = gmdate( 'Y-m-d H:i:s', $time );
|
622 |
|
623 |
if ( $in_blog_timezone ) {
|
624 |
$date = get_date_from_gmt( $date, 'Y-m-d H:i:s' );
|
279 |
private function get_matomo_info() {
|
280 |
$rows = array();
|
281 |
|
282 |
+
$plugin_data = get_plugin_data( MATOMO_ANALYTICS_FILE, $markup = false, $translate = false );
|
283 |
+
$install_time = get_option(Installer::OPTION_NAME_INSTALL_DATE);
|
284 |
|
285 |
$rows[] = array(
|
286 |
'name' => esc_html__( 'Matomo Plugin Version', 'matomo' ),
|
357 |
'comment' => '',
|
358 |
);
|
359 |
|
360 |
+
$install_date = '';
|
361 |
+
if (!empty($install_time)) {
|
362 |
+
$install_date = 'Install date: '. $this->convert_time_to_date($install_time, true, false);
|
363 |
+
}
|
364 |
+
|
365 |
$rows[] = array(
|
366 |
'name' => esc_html__( 'Matomo Install Version', 'matomo' ),
|
367 |
'value' => get_option(Installer::OPTION_NAME_INSTALL_VERSION),
|
368 |
+
'comment' => $install_date,
|
369 |
);
|
370 |
|
371 |
$rows[] = array(
|
449 |
);
|
450 |
}
|
451 |
|
452 |
+
$suports_async = false;
|
453 |
if ( ! \WpMatomo::is_safe_mode() && $report ) {
|
454 |
$rows[] = array(
|
455 |
'section' => esc_html__( 'Mandatory checks', 'matomo' ),
|
463 |
$rows = $this->add_diagnostic_results( $rows, $report->getOptionalDiagnosticResults() );
|
464 |
|
465 |
$cli_multi = new CliMulti();
|
466 |
+
$suports_async = $cli_multi->supportsAsync();
|
467 |
|
468 |
$rows[] = array(
|
469 |
'name' => 'Supports Async Archiving',
|
470 |
+
'value' => $suports_async,
|
471 |
'comment' => '',
|
472 |
);
|
473 |
|
568 |
);
|
569 |
|
570 |
$error_log_entries = $this->logger->get_last_logged_entries();
|
571 |
+
|
572 |
if ( ! empty( $error_log_entries ) ) {
|
573 |
+
|
574 |
foreach ( $error_log_entries as $error ) {
|
575 |
+
if (!empty($install_time)
|
576 |
+
&& is_numeric($install_time)
|
577 |
+
&& !empty($error['name'])
|
578 |
+
&& !empty($error['value'])
|
579 |
+
&& is_numeric($error['value'])
|
580 |
+
&& $error['name'] === 'cron_sync'
|
581 |
+
&& $error['value'] < ($install_time + 300)) {
|
582 |
+
// the first sync might right after the installation
|
583 |
+
continue;
|
584 |
+
}
|
585 |
+
|
586 |
$error['value'] = $this->convert_time_to_date( $error['value'], true, false );
|
587 |
$error['is_warning'] = !empty($error['name']) && stripos($error['name'], 'archiv') !== false && $error['name'] !== 'archive_boot';
|
588 |
$error['comment'] = matomo_anonymize_value($error['comment']);
|
589 |
$rows[] = $error;
|
590 |
}
|
591 |
+
|
592 |
+
foreach ( $error_log_entries as $error ) {
|
593 |
+
if ($suports_async
|
594 |
+
&& !empty($error['value']) && is_string($error['value'])
|
595 |
+
&& strpos($error['value'], __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' )) > 0) {
|
596 |
+
|
597 |
+
$rows[] = array(
|
598 |
+
'name' => 'Cli has no MySQL',
|
599 |
+
'value' => true,
|
600 |
+
'comment' => 'It looks like MySQL is not available on CLI. Please read our FAQ on how to fix this issue: https://matomo.org/faq/wordpress/how-do-i-fix-the-error-your-php-installation-appears-to-be-missing-the-mysql-extension-which-is-required-by-wordpress-in-matomo-system-report/ ',
|
601 |
+
'is_error' => true
|
602 |
+
);
|
603 |
+
}
|
604 |
+
}
|
605 |
} else {
|
606 |
$rows[] = array(
|
607 |
'name' => __('None', 'matomo'),
|
653 |
return esc_html__( 'Unknown', 'matomo' );
|
654 |
}
|
655 |
|
656 |
+
$date = gmdate( 'Y-m-d H:i:s', (int)$time );
|
657 |
|
658 |
if ( $in_blog_timezone ) {
|
659 |
$date = get_date_from_gmt( $date, 'Y-m-d H:i:s' );
|
classes/WpMatomo/Admin/views/get_started.php
CHANGED
@@ -57,6 +57,7 @@ if ( empty( $show_this_page ) ) {
|
|
57 |
<?php echo sprintf( esc_html__( 'Give your users the chance to opt-out of tracking by adding the shortcode %1$s to your privacy page. You can %2$stweak the opt-out to your liking - see the Privacy Settings%3$s.', 'matomo' ), '<code>[matomo_opt_out]</code>', '<a href="' . AdminSettings::make_url( AdminSettings::TAB_PRIVACY ) . '">', '</a>' ); ?>
|
58 |
|
59 |
<?php esc_html_e( 'You may also need to mention that you are using Matomo Analytics on your website.', 'matomo' ); ?>
|
|
|
60 |
|
61 |
<h2>3. <?php esc_html_e( 'Done', 'matomo' ); ?></h2>
|
62 |
<form method="post">
|
57 |
<?php echo sprintf( esc_html__( 'Give your users the chance to opt-out of tracking by adding the shortcode %1$s to your privacy page. You can %2$stweak the opt-out to your liking - see the Privacy Settings%3$s.', 'matomo' ), '<code>[matomo_opt_out]</code>', '<a href="' . AdminSettings::make_url( AdminSettings::TAB_PRIVACY ) . '">', '</a>' ); ?>
|
58 |
|
59 |
<?php esc_html_e( 'You may also need to mention that you are using Matomo Analytics on your website.', 'matomo' ); ?>
|
60 |
+
<?php echo sprintf(esc_html__( 'By %1$sdisabling cookies in the tracking settings%2$s, you might not need to ask for any cookie or tracking consent if the GDPR or ePrivacy applies to you %3$s(learn more)%4$s.', 'matomo' ), '<a href="'.AdminSettings::make_url( AdminSettings::TAB_TRACKING ).'" target="_blank" rel="noreferrer noopener">', '</a>', '<a href="https://matomo.org/faq/new-to-piwik/how-do-i-use-matomo-analytics-without-consent-or-cookie-banner/" target="_blank" rel="noreferrer noopener">', '</a>'); ?>
|
61 |
|
62 |
<h2>3. <?php esc_html_e( 'Done', 'matomo' ); ?></h2>
|
63 |
<form method="post">
|
classes/WpMatomo/Admin/views/marketplace.php
CHANGED
@@ -180,121 +180,123 @@ $matomo_extra_url_params = '&' . http_build_query(
|
|
180 |
|
181 |
matomo_show_tables($matomo_feature_sections, $matomo_show_offer);
|
182 |
|
|
|
|
|
183 |
$matomo_feature_sections = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
array(
|
185 |
-
'title' => '',
|
186 |
'features' =>
|
187 |
array(
|
188 |
-
array(
|
189 |
-
'name' => 'Heatmaps',
|
190 |
-
'description' => 'Truly understand your visitors by seeing where they click, hover, type and scroll. Find confusing elements, discover useless parts and find out what content your users actually engage with.',
|
191 |
-
'price' => '',
|
192 |
-
'url' => 'https://matomo.org/heatmaps/',
|
193 |
-
'video' => 'https://matomo.org/docs/video-matomos-heatmaps-feature/?pk_campaign=WP&pk_source=Plugin',
|
194 |
-
'image' => '',
|
195 |
-
),
|
196 |
-
array(
|
197 |
-
'name' => 'Session Recording',
|
198 |
-
'description' => 'Watch videos of how your real visitors use your website and what experience they have. Find out why they leave and what they are looking for so you can improve the usability of your site.',
|
199 |
-
'price' => '',
|
200 |
-
'url' => 'https://matomo.org/session-recordings/',
|
201 |
-
'video' => 'https://matomo.org/docs/matomos-session-recordings-feature/?pk_campaign=WP&pk_source=Plugin',
|
202 |
-
'image' => '',
|
203 |
-
),
|
204 |
-
array(
|
205 |
-
'name' => 'Users Flow',
|
206 |
-
'description' => 'A visual representation of the most popular paths your users take through your website & app which lets you understand your users needs and where they leave.',
|
207 |
-
'price' => '',
|
208 |
-
'url' => 'https://matomo.org/docs/users-flow/?pk_campaign=WP&pk_source=Plugin',
|
209 |
-
'video' => '',
|
210 |
-
'image' => '',
|
211 |
-
),
|
212 |
array(
|
213 |
'name' => 'Form Analytics',
|
214 |
-
'description' => 'Increase conversions on your online forms and lose less visitors by learning everything about your users behavior and their pain points on your forms.
|
215 |
-
'price' => '',
|
216 |
-
'url' => 'https://matomo.org/
|
217 |
'image' => '',
|
218 |
-
'video' => 'https://matomo.org/docs/video-matomos-form-analytics-feature/?pk_campaign=WP&pk_source=Plugin',
|
219 |
),
|
220 |
array(
|
221 |
'name' => 'Video & Audio Analytics',
|
222 |
-
'description' => 'Get
|
223 |
-
'price' => '',
|
224 |
-
'url' => 'https://matomo.org/
|
225 |
'image' => '',
|
226 |
-
'video' => 'https://matomo.org/docs/video-media-analytics/?pk_campaign=WP&pk_source=Plugin',
|
227 |
),
|
228 |
array(
|
229 |
-
'name' => '
|
230 |
-
'description' => '
|
231 |
-
'price' => '',
|
232 |
-
'url' => 'https://matomo.org/
|
233 |
-
'video' => 'https://matomo.org/docs/video-matomo-analytics-funnels-feature/?pk_campaign=WP&pk_source=Plugin',
|
234 |
'image' => '',
|
235 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
array(
|
237 |
-
'name' => 'Search Engine Keywords',
|
238 |
'description' => 'All keywords searched by your users on search engines are now visible into your Referrers reports! The ultimate solution to \'Keyword not defined\'.',
|
239 |
-
'price' => '',
|
240 |
-
'url' => 'https://matomo.org/
|
241 |
-
'video' => '',
|
242 |
'image' => '',
|
243 |
),
|
244 |
array(
|
245 |
-
'name' => '
|
246 |
-
'description' => 'Analyse the success of your Google Ads campaigns
|
247 |
-
'price' => '',
|
248 |
-
'url' => 'https://matomo.org/
|
249 |
-
'video' => '',
|
250 |
'image' => '',
|
251 |
),
|
252 |
array(
|
253 |
'name' => 'Multi Attribution',
|
254 |
'description' => 'Get a clear understanding of how much credit each of your marketing channel is actually responsible for to shift your marketing efforts wisely.',
|
255 |
-
'price' => '',
|
256 |
-
'url' => 'https://matomo.org/
|
257 |
-
'video' => 'https://matomo.org/docs/video-matomo-analytics-attribution-feature/?pk_campaign=WP&pk_source=Plugin',
|
258 |
'image' => '',
|
259 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
array(
|
261 |
-
'name' => '
|
262 |
-
'description' => '
|
263 |
-
'price' => '',
|
264 |
-
'url' => 'https://matomo.org/
|
265 |
'image' => '',
|
266 |
-
'video' => 'https://matomo.org/docs/video-matomos-custom-reports-feature/?pk_campaign=WP&pk_source=Plugin',
|
267 |
),
|
268 |
array(
|
269 |
'name' => 'Cohorts',
|
270 |
'description' => 'Track your retention efforts over time and keep your visitors engaged and coming back for more.',
|
271 |
-
'price' => '',
|
272 |
-
'url' => 'https://matomo.org/
|
273 |
'image' => '',
|
274 |
-
'video' => '',
|
275 |
),
|
276 |
),
|
277 |
),
|
278 |
);
|
279 |
-
?>
|
280 |
|
281 |
-
|
282 |
-
<h3 style="color: red">Limited time offer! Matomo Premium Bundle only 199€/year (300€ off)</h3>
|
283 |
-
<h1>Your marketing efforts are too valuable to focus on the wrong things.<br> Take your Matomo for WordPress to the next level to push out content and changes to your website that make you consistently more successful. 🚀</h1>
|
284 |
-
<p><a href="https://matomo.org/wp-premium-bundle/" class="button button-primary"
|
285 |
-
style="background: limegreen;border-color: limegreen;font-size: 18px;"
|
286 |
-
target="_blank" rel="noreferrer noopener" role="button">Learn more</a>
|
287 |
-
</p>
|
288 |
-
<p><br></p>
|
289 |
-
<h2>What's included in this bundle?</h2>
|
290 |
-
<?php
|
291 |
|
292 |
-
matomo_show_tables($matomo_feature_sections, $matomo_show_offer);
|
293 |
?>
|
294 |
-
|
295 |
-
</h3>
|
296 |
-
<h3>Matomo is free open source software. <strong>Purchasing this bundle will help fund the future of the Matomo open-source project.</strong><br>Thank you for your support!</h3>
|
297 |
-
<a href="https://matomo.org/wp-premium-bundle/"
|
298 |
-
style="background: limegreen;border-color: limegreen;font-size: 18px;" class="button button-primary" target="_blank" rel="noreferrer noopener" role="button">Learn more</a>
|
299 |
-
</div>
|
300 |
</div>
|
180 |
|
181 |
matomo_show_tables($matomo_feature_sections, $matomo_show_offer);
|
182 |
|
183 |
+
echo '<br>';
|
184 |
+
|
185 |
$matomo_feature_sections = array(
|
186 |
+
array(
|
187 |
+
'title' => 'Most popular premium features',
|
188 |
+
'features' =>
|
189 |
+
array(
|
190 |
+
array(
|
191 |
+
'name' => 'Heatmap & Session Recording',
|
192 |
+
'description' => 'Truly understand your visitors by seeing where they click, hover, type and scroll. Replay their actions in a video and ultimately increase conversions.',
|
193 |
+
'price' => '99EUR / 119USD',
|
194 |
+
'url' => 'https://plugins.matomo.org/HeatmapSessionRecording?wp=1',
|
195 |
+
'image' => '',
|
196 |
+
),
|
197 |
+
array(
|
198 |
+
'name' => 'Custom Reports',
|
199 |
+
'description' => 'Pull out the information you need in order to be successful. Develop your custom strategy to meet your individualized goals while saving money & time.',
|
200 |
+
'price' => '99EUR / 119USD',
|
201 |
+
'url' => 'https://plugins.matomo.org/CustomReports?wp=1',
|
202 |
+
'image' => '',
|
203 |
+
),
|
204 |
+
|
205 |
+
array(
|
206 |
+
'name' => 'Premium Bundle',
|
207 |
+
'description' => 'All premium features in one bundle, make the most out of your Matomo for WordPress and enjoy discounts of over 20%!',
|
208 |
+
'price' => '499EUR / 579USD',
|
209 |
+
'url' => 'https://plugins.matomo.org/WpPremiumBundle?wp=1',
|
210 |
+
'image' => '',
|
211 |
+
),
|
212 |
+
),
|
213 |
+
),
|
214 |
array(
|
215 |
+
'title' => 'Most popular content engagement',
|
216 |
'features' =>
|
217 |
array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
array(
|
219 |
'name' => 'Form Analytics',
|
220 |
+
'description' => 'Increase conversions on your online forms and lose less visitors by learning everything about your users behavior and their pain points on your forms.',
|
221 |
+
'price' => '79EUR / 89USD',
|
222 |
+
'url' => 'https://plugins.matomo.org/FormAnalytics?wp=1',
|
223 |
'image' => '',
|
|
|
224 |
),
|
225 |
array(
|
226 |
'name' => 'Video & Audio Analytics',
|
227 |
+
'description' => 'Grow your business with advanced video & audio analytics. Get powerful insights into how your audience watches your videos and listens to your audio.',
|
228 |
+
'price' => '79EUR / 89USD',
|
229 |
+
'url' => 'https://plugins.matomo.org/MediaAnalytics?wp=1',
|
230 |
'image' => '',
|
|
|
231 |
),
|
232 |
array(
|
233 |
+
'name' => 'Users Flow',
|
234 |
+
'description' => 'Users Flow is a visual representation of the most popular paths your users take through your website & app which lets you understand your users needs.',
|
235 |
+
'price' => '39EUR / 39USD',
|
236 |
+
'url' => 'https://plugins.matomo.org/UsersFlow?wp=1',
|
|
|
237 |
'image' => '',
|
238 |
),
|
239 |
+
),
|
240 |
+
),
|
241 |
+
array(
|
242 |
+
'title' => 'Most popular acquisition & SEO features',
|
243 |
+
'features' =>
|
244 |
+
array(
|
245 |
array(
|
246 |
+
'name' => 'Search Engine Keywords Performance',
|
247 |
'description' => 'All keywords searched by your users on search engines are now visible into your Referrers reports! The ultimate solution to \'Keyword not defined\'.',
|
248 |
+
'price' => '69EUR / 79USD',
|
249 |
+
'url' => 'https://plugins.matomo.org/SearchEngineKeywordsPerformance?wp=1',
|
|
|
250 |
'image' => '',
|
251 |
),
|
252 |
array(
|
253 |
+
'name' => 'Paid Advertising Performance',
|
254 |
+
'description' => 'Analyse the success of your Google Ads campaigns directly in your Matomo. See what keywords and search queries are leading to clicks for your paid ads and bringing your business the highest ROI.',
|
255 |
+
'price' => '79EUR / 89USD',
|
256 |
+
'url' => 'https://plugins.matomo.org/PaidAdvertisingPerformance?wp=1',
|
|
|
257 |
'image' => '',
|
258 |
),
|
259 |
array(
|
260 |
'name' => 'Multi Attribution',
|
261 |
'description' => 'Get a clear understanding of how much credit each of your marketing channel is actually responsible for to shift your marketing efforts wisely.',
|
262 |
+
'price' => '39EUR / 39USD',
|
263 |
+
'url' => 'https://plugins.matomo.org/MultiChannelConversionAttribution?wp=1',
|
|
|
264 |
'image' => '',
|
265 |
),
|
266 |
+
/*
|
267 |
+
array(
|
268 |
+
'name' => 'Activity Log',
|
269 |
+
'description' => 'Truly understand your visitors by seeing where they click, hover, type and scroll. Replay their actions in a video and ultimately increase conversions',
|
270 |
+
'price' => '19EUR / 19USD',
|
271 |
+
'url' => 'https://plugins.matomo.org/ActivityLog?wp=1',
|
272 |
+
'image' => '',
|
273 |
+
),*/
|
274 |
+
),
|
275 |
+
),
|
276 |
+
array(
|
277 |
+
'title' => 'Other premium features',
|
278 |
+
'features' =>
|
279 |
+
array(
|
280 |
array(
|
281 |
+
'name' => 'Funnels',
|
282 |
+
'description' => 'Identify and understand where your visitors drop off to increase your conversions, sales and revenue with your existing traffic.',
|
283 |
+
'price' => '89EUR / 99USD',
|
284 |
+
'url' => 'https://plugins.matomo.org/Funnels?wp=1',
|
285 |
'image' => '',
|
|
|
286 |
),
|
287 |
array(
|
288 |
'name' => 'Cohorts',
|
289 |
'description' => 'Track your retention efforts over time and keep your visitors engaged and coming back for more.',
|
290 |
+
'price' => '49EUR / 59USD',
|
291 |
+
'url' => 'https://plugins.matomo.org/Cohorts?wp=1',
|
292 |
'image' => '',
|
|
|
293 |
),
|
294 |
),
|
295 |
),
|
296 |
);
|
|
|
297 |
|
298 |
+
matomo_show_tables($matomo_feature_sections, $matomo_show_offer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
299 |
|
|
|
300 |
?>
|
301 |
+
|
|
|
|
|
|
|
|
|
|
|
302 |
</div>
|
classes/WpMatomo/Admin/views/tracking.php
CHANGED
@@ -125,6 +125,8 @@ if ( $was_updated ) {
|
|
125 |
$matomo_full_generated_tracking_group
|
126 |
);
|
127 |
|
|
|
|
|
128 |
$matomo_form->show_checkbox( 'track_ecommerce', esc_html__( 'Enable ecommerce', 'matomo' ), esc_html__( 'Matom can track Ecommerce orders, abandoned carts and product views for WooCommerce, Easy Digital Analytics, MemberPress, and more. Disabling this feature will also remove Ecommerce reports from the Matomo UI.', 'matomo' ), $matomo_is_not_tracking, $matomo_full_generated_tracking_group . ' matomo-track-option-manually matomo-track-option-tagmanager' );
|
129 |
|
130 |
$matomo_form->show_checkbox( 'track_search', esc_html__( 'Track search', 'matomo' ), esc_html__( 'Use Matomo\'s advanced Site Search Analytics feature.', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://matomo.org/docs/site-search/#track-site-search-using-the-tracking-api-advanced-users-only" target="_BLANK">', '</a>' ), $matomo_is_not_tracking, $matomo_full_generated_tracking_group . ' matomo-track-option-manually matomo-track-option-tagmanager' );
|
@@ -141,8 +143,6 @@ if ( $was_updated ) {
|
|
141 |
|
142 |
$matomo_form->show_input( 'add_download_extensions', esc_html__( 'Add new file types for download tracking', 'matomo' ), esc_html__( 'Add file extensions for download tracking, divided by a vertical bar (|).', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://developer.matomo.org/guides/tracking-javascript-guide#tracking-file-downloads" target="_BLANK">', '</a>' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
143 |
|
144 |
-
$matomo_form->show_checkbox( 'disable_cookies', esc_html__( 'Disable cookies', 'matomo' ), esc_html__( 'Disable all tracking cookies for a visitor.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
145 |
-
|
146 |
$matomo_form->show_checkbox( 'limit_cookies', esc_html__( 'Limit cookie lifetime', 'matomo' ), esc_html__( 'You can limit the cookie lifetime to avoid tracking your users over a longer period as necessary.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group, true, 'jQuery(\'tr.matomo-cookielifetime-option\').toggleClass(\'matomo-hidden\');' );
|
147 |
|
148 |
$matomo_form->show_input( 'limit_cookies_visitor', esc_html__( 'Visitor timeout (seconds)', 'matomo' ), false, $matomo_is_not_generated_tracking || ! $settings->get_global_option( 'limit_cookies' ), $matomo_full_generated_tracking_group . ' matomo-cookielifetime-option' . ( $settings->get_global_option( 'limit_cookies' ) ? '' : ' matomo-hidden' ) );
|
125 |
$matomo_full_generated_tracking_group
|
126 |
);
|
127 |
|
128 |
+
$matomo_form->show_checkbox( 'disable_cookies', esc_html__( 'Disable cookies', 'matomo' ), esc_html__( 'Disable all tracking cookies for a visitor.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
129 |
+
|
130 |
$matomo_form->show_checkbox( 'track_ecommerce', esc_html__( 'Enable ecommerce', 'matomo' ), esc_html__( 'Matom can track Ecommerce orders, abandoned carts and product views for WooCommerce, Easy Digital Analytics, MemberPress, and more. Disabling this feature will also remove Ecommerce reports from the Matomo UI.', 'matomo' ), $matomo_is_not_tracking, $matomo_full_generated_tracking_group . ' matomo-track-option-manually matomo-track-option-tagmanager' );
|
131 |
|
132 |
$matomo_form->show_checkbox( 'track_search', esc_html__( 'Track search', 'matomo' ), esc_html__( 'Use Matomo\'s advanced Site Search Analytics feature.', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://matomo.org/docs/site-search/#track-site-search-using-the-tracking-api-advanced-users-only" target="_BLANK">', '</a>' ), $matomo_is_not_tracking, $matomo_full_generated_tracking_group . ' matomo-track-option-manually matomo-track-option-tagmanager' );
|
143 |
|
144 |
$matomo_form->show_input( 'add_download_extensions', esc_html__( 'Add new file types for download tracking', 'matomo' ), esc_html__( 'Add file extensions for download tracking, divided by a vertical bar (|).', 'matomo' ) . ' ' . sprintf( esc_html__( 'See %1$sMatomo documentation%2$s.', 'matomo' ), '<a href="https://developer.matomo.org/guides/tracking-javascript-guide#tracking-file-downloads" target="_BLANK">', '</a>' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group );
|
145 |
|
|
|
|
|
146 |
$matomo_form->show_checkbox( 'limit_cookies', esc_html__( 'Limit cookie lifetime', 'matomo' ), esc_html__( 'You can limit the cookie lifetime to avoid tracking your users over a longer period as necessary.', 'matomo' ), $matomo_is_not_generated_tracking, $matomo_full_generated_tracking_group, true, 'jQuery(\'tr.matomo-cookielifetime-option\').toggleClass(\'matomo-hidden\');' );
|
147 |
|
148 |
$matomo_form->show_input( 'limit_cookies_visitor', esc_html__( 'Visitor timeout (seconds)', 'matomo' ), false, $matomo_is_not_generated_tracking || ! $settings->get_global_option( 'limit_cookies' ), $matomo_full_generated_tracking_group . ' matomo-cookielifetime-option' . ( $settings->get_global_option( 'limit_cookies' ) ? '' : ' matomo-hidden' ) );
|
classes/WpMatomo/Ecommerce/Woocommerce.php
CHANGED
@@ -29,6 +29,7 @@ class Woocommerce extends Base {
|
|
29 |
add_action( 'woocommerce_cart_item_removed', array( $this, 'on_cart_updated' ), 99999, 0 );
|
30 |
add_action( 'woocommerce_cart_item_restored', array( $this, 'on_cart_updated' ), 99999, 0 );
|
31 |
add_action( 'woocommerce_cart_item_set_quantity', array( $this, 'on_cart_updated' ), 99999, 0 );
|
|
|
32 |
|
33 |
if (!$this->is_doing_ajax()) {
|
34 |
// prevent possibly executing same event twice where eg first a PHP Matomo tracker request is created
|
@@ -42,6 +43,23 @@ class Woocommerce extends Base {
|
|
42 |
add_action( 'woocommerce_removed_coupon', array( $this, 'on_cart_updated' ), 99999, 0 );
|
43 |
}
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
public function maybe_track_order_complete() {
|
46 |
global $wp;
|
47 |
|
29 |
add_action( 'woocommerce_cart_item_removed', array( $this, 'on_cart_updated' ), 99999, 0 );
|
30 |
add_action( 'woocommerce_cart_item_restored', array( $this, 'on_cart_updated' ), 99999, 0 );
|
31 |
add_action( 'woocommerce_cart_item_set_quantity', array( $this, 'on_cart_updated' ), 99999, 0 );
|
32 |
+
add_action('woocommerce_thankyou', array($this, 'anonymise_orderid_in_url'), 1, 1);
|
33 |
|
34 |
if (!$this->is_doing_ajax()) {
|
35 |
// prevent possibly executing same event twice where eg first a PHP Matomo tracker request is created
|
43 |
add_action( 'woocommerce_removed_coupon', array( $this, 'on_cart_updated' ), 99999, 0 );
|
44 |
}
|
45 |
|
46 |
+
public function anonymise_orderid_in_url($order_id)
|
47 |
+
{
|
48 |
+
if ( !empty($order_id) && is_numeric($order_id)) {
|
49 |
+
$order_id = (int) $order_id;
|
50 |
+
echo "<script>(function () {
|
51 |
+
if (location.href) {
|
52 |
+
window._paq = window._paq || [];
|
53 |
+
var url = location.href;
|
54 |
+
if (url.indexOf('?') > 0) {
|
55 |
+
url = url.substr(0, url.indexOf('?')); // remove order key
|
56 |
+
}
|
57 |
+
window._paq.push(['setCustomUrl', url.replace('$order_id', 'orderid_anonymised')]);
|
58 |
+
}
|
59 |
+
})()</script>";
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
public function maybe_track_order_complete() {
|
64 |
global $wp;
|
65 |
|
classes/WpMatomo/Installer.php
CHANGED
@@ -104,14 +104,14 @@ class Installer {
|
|
104 |
// we're scheduling another update in case there are some dimensions to be updated or anything
|
105 |
// it is possible that because the plugins need to be reloaded etc that those updates are not executed right
|
106 |
// away but need an actual reload and cache clearance etc
|
107 |
-
wp_schedule_single_event( time() +
|
108 |
|
109 |
// to set up geoip in the background later... don't want this to influence the install
|
110 |
-
wp_schedule_single_event( time() +
|
111 |
|
112 |
// in case something fails with website or user creation
|
113 |
// also to set up all the other users
|
114 |
-
wp_schedule_single_event( time() +
|
115 |
|
116 |
update_option(self::OPTION_NAME_INSTALL_DATE, time());
|
117 |
$plugin_data = get_plugin_data( MATOMO_ANALYTICS_FILE, $markup = false, $translate = false );
|
104 |
// we're scheduling another update in case there are some dimensions to be updated or anything
|
105 |
// it is possible that because the plugins need to be reloaded etc that those updates are not executed right
|
106 |
// away but need an actual reload and cache clearance etc
|
107 |
+
wp_schedule_single_event( time() + 30, ScheduledTasks::EVENT_UPDATE );
|
108 |
|
109 |
// to set up geoip in the background later... don't want this to influence the install
|
110 |
+
wp_schedule_single_event( time() + 35, ScheduledTasks::EVENT_GEOIP );
|
111 |
|
112 |
// in case something fails with website or user creation
|
113 |
// also to set up all the other users
|
114 |
+
wp_schedule_single_event( time() + 45, ScheduledTasks::EVENT_SYNC );
|
115 |
|
116 |
update_option(self::OPTION_NAME_INSTALL_DATE, time());
|
117 |
$plugin_data = get_plugin_data( MATOMO_ANALYTICS_FILE, $markup = false, $translate = false );
|
classes/WpMatomo/Site/Sync.php
CHANGED
@@ -49,10 +49,21 @@ class Sync {
|
|
49 |
}
|
50 |
|
51 |
public function register_hooks() {
|
52 |
-
add_action( 'update_option_blogname', array( $this, '
|
53 |
-
add_action( 'update_option_home', array( $this, '
|
54 |
-
add_action( 'update_option_siteurl', array( $this, '
|
55 |
-
add_action( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
}
|
57 |
|
58 |
public function sync_all() {
|
49 |
}
|
50 |
|
51 |
public function register_hooks() {
|
52 |
+
add_action( 'update_option_blogname', array( $this, 'sync_current_site_ignore_error' ) );
|
53 |
+
add_action( 'update_option_home', array( $this, 'sync_current_site_ignore_error' ) );
|
54 |
+
add_action( 'update_option_siteurl', array( $this, 'sync_current_site_ignore_error' ) );
|
55 |
+
add_action( 'update_option_timezone_string', array( $this, 'sync_current_site_ignore_error' ) );
|
56 |
+
add_action( 'matomo_setting_change_track_ecommerce', array( $this, 'sync_current_site_ignore_error' ) );
|
57 |
+
}
|
58 |
+
|
59 |
+
public function sync_current_site_ignore_error()
|
60 |
+
{
|
61 |
+
try {
|
62 |
+
$this->sync_current_site();
|
63 |
+
} catch (\Exception $e) {
|
64 |
+
$this->logger->log( 'Ignoring site sync error: ' . $e->getMessage());
|
65 |
+
$this->logger->log_exception('sync_site_ignore', $e);
|
66 |
+
}
|
67 |
}
|
68 |
|
69 |
public function sync_all() {
|
classes/WpMatomo/TrackingCode/TrackingCodeGenerator.php
CHANGED
@@ -156,7 +156,7 @@ class TrackingCodeGenerator {
|
|
156 |
' . self::MTM_INIT . '
|
157 |
_mtm.push({\'mtm.startTime\': (new Date().getTime()), \'event\': \'mtm.Start\'});
|
158 |
var d=document, g=d.createElement(\'script\'), s=d.getElementsByTagName(\'script\')[0];
|
159 |
-
g.type=\'text/javascript\'; g.async=true; g.
|
160 |
</script>';
|
161 |
}
|
162 |
}
|
@@ -285,11 +285,11 @@ g.type=\'text/javascript\'; g.async=true; g.defer=true; g.src="' . $container_ur
|
|
285 |
$script .= "var _paq = window._paq || [];\n";
|
286 |
$script .= implode( "\n", $options );
|
287 |
$script .= self::TRACKPAGEVIEW;
|
288 |
-
$script .= "_paq.push(['enableLinkTracking']);";
|
289 |
$script .= "_paq.push(['setTrackerUrl', " . wp_json_encode( $tracker_endpoint ) . ']);';
|
290 |
$script .= "_paq.push(['setSiteId', '" . intval( $idsite ) . "']);";
|
291 |
$script .= "var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
292 |
-
g.type='text/javascript'; g.async=true; g.
|
293 |
$script .= '</script>';
|
294 |
$script .= '<!-- End Matomo Code -->';
|
295 |
|
156 |
' . self::MTM_INIT . '
|
157 |
_mtm.push({\'mtm.startTime\': (new Date().getTime()), \'event\': \'mtm.Start\'});
|
158 |
var d=document, g=d.createElement(\'script\'), s=d.getElementsByTagName(\'script\')[0];
|
159 |
+
g.type=\'text/javascript\'; g.async=true; g.src="' . $container_url . '"; s.parentNode.insertBefore(g,s);
|
160 |
</script>';
|
161 |
}
|
162 |
}
|
285 |
$script .= "var _paq = window._paq || [];\n";
|
286 |
$script .= implode( "\n", $options );
|
287 |
$script .= self::TRACKPAGEVIEW;
|
288 |
+
$script .= "_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);";
|
289 |
$script .= "_paq.push(['setTrackerUrl', " . wp_json_encode( $tracker_endpoint ) . ']);';
|
290 |
$script .= "_paq.push(['setSiteId', '" . intval( $idsite ) . "']);";
|
291 |
$script .= "var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
292 |
+
g.type='text/javascript'; g.async=true; g.src=" . wp_json_encode( $js_endpoint ) . '; s.parentNode.insertBefore(g,s);';
|
293 |
$script .= '</script>';
|
294 |
$script .= '<!-- End Matomo Code -->';
|
295 |
|
config/common.config.ini.php
CHANGED
@@ -4,6 +4,9 @@
|
|
4 |
[database]
|
5 |
adapter = WordPress
|
6 |
|
|
|
|
|
|
|
7 |
[General]
|
8 |
enable_update_communication = 0
|
9 |
enable_auto_update = 0
|
4 |
[database]
|
5 |
adapter = WordPress
|
6 |
|
7 |
+
[Tracker]
|
8 |
+
tracker_cache_file_ttl = 4385
|
9 |
+
|
10 |
[General]
|
11 |
enable_update_communication = 0
|
12 |
enable_auto_update = 0
|
matomo.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Description: The #1 Google Analytics alternative that gives you full control over your data and protects the privacy for your users. Free, secure and open.
|
5 |
* Author: Matomo
|
6 |
* Author URI: https://matomo.org
|
7 |
-
* Version: 1.1.
|
8 |
* Domain Path: /languages
|
9 |
* WC requires at least: 2.4.0
|
10 |
* WC tested up to: 4.0.0
|
4 |
* Description: The #1 Google Analytics alternative that gives you full control over your data and protects the privacy for your users. Free, secure and open.
|
5 |
* Author: Matomo
|
6 |
* Author URI: https://matomo.org
|
7 |
+
* Version: 1.1.3
|
8 |
* Domain Path: /languages
|
9 |
* WC requires at least: 2.4.0
|
10 |
* WC tested up to: 4.0.0
|
plugins/WordPress/WordPress.php
CHANGED
@@ -38,6 +38,7 @@ class WordPress extends Plugin
|
|
38 |
return array(
|
39 |
'API.UsersManager.getTokenAuth' => 'disableApiIfNotBootstrapped',
|
40 |
'Request.dispatch' => 'onDispatchRequest',
|
|
|
41 |
'User.isNotAuthorized' => array('before' => true, 'function' => 'noAccess'),
|
42 |
'Http.sendHttpRequest' => 'onSendHttpRequestBy',
|
43 |
'Widget.filterWidgets' => 'filterWidgets',
|
@@ -107,6 +108,7 @@ class WordPress extends Plugin
|
|
107 |
if ($shouldExecuteTask && $task) {
|
108 |
$blockedMethods = array(
|
109 |
'updateSpammerBlacklist',
|
|
|
110 |
'updateSearchEngines',
|
111 |
'updateSocials',
|
112 |
'Piwik\Plugins\Referrers\Tasks.update', // just in case any of the tasks was renamed...
|
@@ -271,8 +273,15 @@ class WordPress extends Plugin
|
|
271 |
}
|
272 |
}
|
273 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
public function onDispatchRequest(&$module, &$action, &$parameters)
|
275 |
-
{
|
276 |
if ($module === 'Proxy' && in_array($action, array('getNonCoreJs', 'getCoreJs', 'getCss'))) {
|
277 |
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
|
278 |
} else {
|
38 |
return array(
|
39 |
'API.UsersManager.getTokenAuth' => 'disableApiIfNotBootstrapped',
|
40 |
'Request.dispatch' => 'onDispatchRequest',
|
41 |
+
'Request.dispatch.end' => 'onDispatchRequestEnd',
|
42 |
'User.isNotAuthorized' => array('before' => true, 'function' => 'noAccess'),
|
43 |
'Http.sendHttpRequest' => 'onSendHttpRequestBy',
|
44 |
'Widget.filterWidgets' => 'filterWidgets',
|
108 |
if ($shouldExecuteTask && $task) {
|
109 |
$blockedMethods = array(
|
110 |
'updateSpammerBlacklist',
|
111 |
+
'updateSpammerList',
|
112 |
'updateSearchEngines',
|
113 |
'updateSocials',
|
114 |
'Piwik\Plugins\Referrers\Tasks.update', // just in case any of the tasks was renamed...
|
273 |
}
|
274 |
}
|
275 |
|
276 |
+
public function onDispatchRequestEnd(&$result, $module, $action, $parameters) {
|
277 |
+
if (!empty($result) && is_string($result)) {
|
278 |
+
// https://wordpress.org/support/topic/bugged-favicon/#post-12995669
|
279 |
+
$result = str_replace('<link rel="mask-icon"', '<link rel="ignore-mask-icon-ignore"', $result);
|
280 |
+
$result = str_replace('plugins/CoreHome/images/applePinnedTab.svg', '', $result);
|
281 |
+
}
|
282 |
+
}
|
283 |
public function onDispatchRequest(&$module, &$action, &$parameters)
|
284 |
+
{
|
285 |
if ($module === 'Proxy' && in_array($action, array('getNonCoreJs', 'getCoreJs', 'getCss'))) {
|
286 |
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
|
287 |
} else {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: matomo,piwik,analytics,statistics,stats,tracking,ecommerce
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.4
|
7 |
-
Stable tag: 1.1.
|
8 |
Requires PHP: 7.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
@@ -100,7 +100,28 @@ Over 1 million websites in over 190 countries are using Matomo already. Join the
|
|
100 |
* When you enter a URL in the SEO ranking widget, then a request with the entered URL may be sent to Google, Alexa, Bing, and other SEO providers.
|
101 |
|
102 |
== Installation ==
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
* Go to "Matomo Analytics" in the WordPress Admin Dashboard.
|
105 |
* Click on "Activate tracking" in the "Get started" page.
|
106 |
* That's it! You can further customize the tracking in the settings page.
|
@@ -126,6 +147,9 @@ The Tag Manager can be disabled by placing `define('MATOMO_ENABLE_TAG_MANAGER',
|
|
126 |
|
127 |
The Tag Manager does currently not work in WP Multisite mode.
|
128 |
|
|
|
|
|
|
|
129 |
= Which MySQL versions are supported?
|
130 |
Matomo should run on most MySQL versions. However, we only support MySQL 5.5 and newer. It should also work with MariaDB and other MySQL compatible databases.
|
131 |
|
@@ -163,4 +187,4 @@ Needing to know more? [Click here to view all of our FAQs on our website](https:
|
|
163 |
|
164 |
== Changelog ==
|
165 |
|
166 |
-
[See changelog for all versions](https://github.com/matomo-org/wp-matomo/blob/develop/CHANGELOG.md).
|
4 |
Tags: matomo,piwik,analytics,statistics,stats,tracking,ecommerce
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.4
|
7 |
+
Stable tag: 1.1.3
|
8 |
Requires PHP: 7.2
|
9 |
License: GPLv3 or later
|
10 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
100 |
* When you enter a URL in the SEO ranking widget, then a request with the entered URL may be sent to Google, Alexa, Bing, and other SEO providers.
|
101 |
|
102 |
== Installation ==
|
103 |
+
|
104 |
+
= Minimum Requirements =
|
105 |
+
|
106 |
+
* PHP 7.2 or greater
|
107 |
+
* MySQL 5.5 or greater is recommended
|
108 |
+
* 128MB memory or greater is recommended
|
109 |
+
|
110 |
+
= Automatic installation =
|
111 |
+
|
112 |
+
* Log in to your WordPress Admin Dashboard
|
113 |
+
* Navigate to the "Plugins" menu
|
114 |
+
* Click "Add New"
|
115 |
+
* Search for "Matomo Analytics"
|
116 |
+
* Click "Install Now" and then "Activate"
|
117 |
+
|
118 |
+
= Manual installation =
|
119 |
+
|
120 |
+
* Downloading the plugin
|
121 |
+
* Upload it to your web server using an FTP application. [Learn more](https://wordpress.org/support/article/managing-plugins/#manual-plugin-installation)
|
122 |
+
|
123 |
+
= Once installed =
|
124 |
+
|
125 |
* Go to "Matomo Analytics" in the WordPress Admin Dashboard.
|
126 |
* Click on "Activate tracking" in the "Get started" page.
|
127 |
* That's it! You can further customize the tracking in the settings page.
|
147 |
|
148 |
The Tag Manager does currently not work in WP Multisite mode.
|
149 |
|
150 |
+
= How do you support WP Multisite?
|
151 |
+
[Click here to learn more](https://matomo.org/faq/wordpress/does-it-support-wp-multisite/)
|
152 |
+
|
153 |
= Which MySQL versions are supported?
|
154 |
Matomo should run on most MySQL versions. However, we only support MySQL 5.5 and newer. It should also work with MariaDB and other MySQL compatible databases.
|
155 |
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
[See changelog for all versions](https://github.com/matomo-org/wp-matomo/blob/develop/CHANGELOG.md).
|