PluginProbe ʕ •ᴥ•ʔ
Matomo Analytics – Powerful, Privacy-First Insights for WordPress / 5.8.2
Matomo Analytics – Powerful, Privacy-First Insights for WordPress v5.8.2
5.11.1 5.11.0 5.10.2 5.10.1 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.3.0 1.3.1 1.3.2 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.1.3 4.10.0 4.11.0 4.12.0 4.13.0 4.13.2 4.13.3 4.13.4 4.13.5 4.14.0 4.14.1 4.14.2 4.15.0 4.15.1 4.15.2 4.15.3 4.2.0 4.3.0 4.3.1 4.4.1 4.4.2 4.5.0 4.6.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.10.0 5.2.0 5.2.1 5.2.2 5.3.0 5.3.1 5.3.2 5.3.3 5.6.0 5.6.1 5.7.0 5.7.1 5.8.0 5.8.1 5.8.2
matomo / classes / WpMatomo / Admin / views / advanced_settings.php
matomo / classes / WpMatomo / Admin / views Last commit date
access.php 7 months ago adblocker-notice.php 7 months ago advanced_settings.php 10 months ago exclusion_settings.php 4 years ago geolocation_settings.php 2 years ago get_started.php 2 months ago import_wp_statistics.php 2 months ago info.php 2 months ago info_bug_report.php 2 years ago info_help.php 1 year ago info_high_traffic.php 2 years ago info_matomo_desc.php 1 year ago info_multisite.php 2 months ago info_newsletter.php 4 years ago info_shared.php 1 year ago marketplace.php 3 months ago marketplace_setup_wizard.php 3 months ago marketplace_setup_wizard_body.php 3 months ago measurable_settings.php 2 years ago privacy_gdpr.php 4 years ago scheduled_tasks_failures.php 2 years ago settings.php 2 months ago settings_errors.php 4 years ago summary.php 2 months ago systemreport.php 2 months ago tracking.php 4 months ago update_notice_clear_cache.php 5 years ago whats-new-notifications.php 1 year ago
advanced_settings.php
123 lines
1 <?php
2 /**
3 * Matomo - free/libre analytics platform
4 *
5 * @link https://matomo.org
6 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
7 * @package matomo
8 * Code Based on
9 * @author Andr&eacute; Br&auml;kling
10 * https://github.com/braekling/WP-Matomo
11 *
12 */
13 /**
14 * phpcs consider all our variables as global and want them prefixed with matomo
15 * phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
16 */
17 use WpMatomo\Admin\AdvancedSettings;
18
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22 /** @var bool $was_updated */
23 /** @var string $matomo_detected_ip */
24 /** @var array $matomo_client_headers */
25 /** @var int $matomo_server_side_tracking_delay */
26 ?>
27
28 <?php
29 if ( $was_updated ) {
30 include 'update_notice_clear_cache.php';
31 }
32 ?>
33 <form method="post">
34 <?php wp_nonce_field( AdvancedSettings::NONCE_NAME ); ?>
35
36 <p><?php esc_html_e( 'Advanced settings', 'matomo' ); ?></p>
37 <table class="matomo-tracking-form widefat">
38 <tbody>
39 <tr>
40 <th width="20%" scope="row"><label
41 for="matomo[proxy_client_header]"><?php esc_html_e( 'Proxy IP headers', 'matomo' ); ?>:</label>
42 </th>
43 <td>
44 <?php
45 echo '<span style="white-space: nowrap;display: inline-block;"><input type="radio" ' . ( empty( $matomo_client_headers ) ? 'checked="checked" ' : '' ) . ' value="REMOTE_ADDR" name="matomo[proxy_client_header]" /> <code>REMOTE_ADDR</code> ' . ( ! empty( $_SERVER['REMOTE_ADDR'] ) ? esc_html( sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) ) : esc_html__( 'No value found', 'matomo' ) ) . ' (' . esc_html__( 'Default', 'matomo' ) . ')</span>';
46 foreach ( AdvancedSettings::$valid_host_headers as $host_header ) {
47 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
48 echo '<span style="white-space: nowrap;display: inline-block;"><input type="radio" ' . ( in_array( $host_header, $matomo_client_headers, true ) ? 'checked="checked" ' : '' ) . 'value="' . esc_attr( $host_header ) . '" name="matomo[proxy_client_header]" /> <code>' . esc_html( $host_header ) . '</code> ' . ( ! empty( $_SERVER[ $host_header ] ) ? ( '<strong>' . esc_html( sanitize_text_field( wp_unslash( $_SERVER[ $host_header ] ) ) ) . '</strong>' ) : esc_html__( 'No value found', 'matomo' ) ) . ' &nbsp; </span>';
49 }
50 ?>
51 </td>
52 <td width="50%">
53 <?php esc_html_e( 'We detected you have the following IP address:', 'matomo' ); ?>
54 <?php echo esc_html( $matomo_detected_ip ); ?> <br>
55 <?php echo sprintf( esc_html__( 'To compare this value with your actual IP address %1$splease click here%2$s.', 'matomo' ), '<a rel="noreferrer noopener" target="_blank" href="https://matomo.org/ip.php">', '</a>' ); ?>
56 <br><br>
57 <?php esc_html_e( 'Should your IP address not match the above value, your WordPress might be behind a proxy and you may need to select a different HTTP header depending on which of the values on the left shows your correct IP address.', 'matomo' ); ?>
58 </td>
59 </tr>
60 <?php if ( ! defined( 'MATOMO_REMOVE_ALL_DATA' ) ) { ?>
61 <tr>
62 <th width="20%" scope="row"><label
63 for="matomo[delete_all_data]"><?php esc_html_e( 'Delete all data on uninstall', 'matomo' ); ?>
64 :</label>
65 </th>
66 <td>
67 <?php
68 echo '<span style="white-space: nowrap;display: inline-block;"><input type="checkbox" ' . ( ! empty( $matomo_delete_all_data ) ? 'checked="checked" ' : '' ) . ' value="1" name="matomo[delete_all_data]" /> ' . esc_html__( 'Yes', 'matomo' ) . '</span>';
69 ?>
70 </td>
71 <td width="50%">
72 <?php esc_html_e( 'By default, when you uninstall the Matomo plugin, all data is deleted and cannot be restored unless you have backups. When you disable this feature, the tracked data in the database will be kept. This can be useful to prevent accidental deletion of all your historical analytics data when you uninstall the plugin.', 'matomo' ); ?> <a
73 href="https://matomo.org/faq/wordpress/how-do-i-delete-or-reset-the-matomo-for-wordpress-data-completely/"
74 target="_blank" rel="noreferrer noopener"><?php esc_html_e( 'Learn more', 'matomo' ); ?></a>
75 </td>
76 </tr>
77 <?php } ?>
78 <tr>
79 <th width="20%" scope="row">
80 <label for="matomo[disable_async_archiving]"><?php esc_html_e( 'Enable archiving via HTTP requests', 'matomo' ); ?>:</label>
81 </th>
82 <td>
83 <span style="white-space:nowrap;display: inline-block;">
84 <input type="checkbox" <?php echo ! empty( $matomo_disable_async_archiving ) || empty( $matomo_async_archiving_supported ) ? 'checked="checked" ' : ''; ?> value="1" name="matomo[disable_async_archiving]"
85 id="matomo[disable_async_archiving]" <?php echo ! empty( $matomo_async_archiving_supported ) ? '' : 'disabled="disabled"'; ?>
86 />
87 </span>
88 </td>
89 <td width="50%">
90 <?php
91 echo ! empty( $matomo_async_archiving_supported )
92 ? esc_html_e( 'If you are experiencing trouble with archiving (as in, report generation), enabling this option may solve the issue.', 'matomo' )
93 : esc_html_e( 'CLI archiving (aka async archiving) is not supported for your server, so archiving via HTTP requests is always enabled.', 'matomo' );
94 ?>
95 </td>
96 </tr>
97 <tr>
98 <th width="20%" scope="row">
99 <label for="matomo_server_side_tracking_delay_secs">
100 <?php esc_html_e( 'Server side tracking delay', 'matomo' ); ?>:
101 </label>
102 </th>
103 <td scope="row">
104 <input id="matomo_server_side_tracking_delay_secs" type="number"
105 name="matomo[server_side_tracking_delay_secs]"
106 value="<?php echo esc_attr( $matomo_server_side_tracking_delay ); ?>" />
107 </td>
108 <td width="50%">
109 <?php esc_html_e( 'Number of seconds delay before server side tracking is executed.', 'matomo' ); ?>
110 <br/><br/>
111 <?php esc_html_e( 'When E-commerce events like cart updates and orders occur during AJAX or REST requests they must be tracked using server side tracking.', 'matomo' ); ?>
112 <?php esc_html_e( 'Server side tracking, however, can result in less useful data, so before doing it Matomo will try to use JavaScript tracking on the next pageview.', 'matomo' ); ?>
113 <?php esc_html_e( 'If no page view occurs, then server side tracking is used. This setting controls how long Matomo waits before deciding to do server side tracking.', 'matomo' ); ?>
114 </td>
115 </tr>
116 <tr>
117 <td colspan="3"><p class="submit"><input name="Submit" type="submit" class="button-primary"
118 value="<?php esc_attr_e( 'Save Changes', 'matomo' ); ?>"/></p></td>
119 </tr>
120 </tbody>
121 </table>
122 </form>
123