• Resolved Mark

    (@codeispoetry)


    Every once in a while I see a visitor going on a viewing or downloading spree and I check what they’re up to, only to find it’s me, logged in as admin, testing/editing various parts of the site.

    On the Settings > Exclusions tab, *all* of the user roles are checked, and I understand this to mean that Matomo should not be tracking any of these. That is what I want: whenever I’m logged in, whatever I do shouldn’t count.

    I fail to understand why my visits are nonetheless tracked. I am visiting from the same browser (Chrome) on the same device and see the wordpress toolbar above all pages, indicating I’m logged in. How does this happen?

    Note that I do *not* see my own visits in the “Visits in realtime” tab. But they do tend to show up in the Visits log.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Mark

    (@codeispoetry)

    (should add: latest WP & Matomo versions)

    Hi @codeispoetry

    Are you sure that the visits you can see are yours?

    The tracking code is not put in the code source of the page when the profile is excluded.
    Can you see either the matomo.js file, or a container_XXXXXXX.js file if you use matomo tag manager, in the source code of your page when browsing your front-office?

    Kind regards

    Mat

    Thread Starter Mark

    (@codeispoetry)

    Here’s what the source says:

    1. I’m logged in:
    <body class="page-template-default page page-id-2 page-parent logged-in admin-bar no-customize-support page-publications site-id-1 custom-header-image layout-two-column-default">

    2. I see the following Matomo code:

    <!-- Matomo --><script type="text/javascript">
    var _paq = window._paq = window._paq || [];
    _paq.push(['setDownloadClasses', "zp-DownloadURL"]);
    _paq.push(['setLinkClasses', "zp-doi-link"]);_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);_paq.push(['setTrackerUrl', "https:\/\/my-site.com\/wp-content\/plugins\/matomo\/app\/matomo.php"]);_paq.push(['setSiteId', '1']);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.src="https:\/\/my-site.com\/wp-content\/uploads\/matomo\/matomo.js"; s.parentNode.insertBefore(g,s);
    </script>
    <!-- End Matomo Code -->

    Also, it is a WordPress multisite install in case that matters.

    • This reply was modified 3 years, 2 months ago by Mark.

    hi @codeispoetry

    can you share with us your system report available from Matomo Analytics > Diagnostics?

    Kind regards

    Mat

    Thread Starter Mark

    (@codeispoetry)

    
    
    # Matomo
    
    * Matomo Plugin Version: 4.4.2
    * Config exists and is writable.: Yes ("$abs_path/wp-content/uploads/matomo/config/config.ini.php" )
    * JS Tracker exists and is writable.: Yes ("$abs_path/wp-content/uploads/matomo/matomo.js" )
    * Plugin directories: Yes ([{"pluginsPathAbsolute":"$abs_path\/wp-content\/plugins\/matomo\/plugins","webrootDirRelativeToMatomo":"..\/"}])
    * Tmp directory writable: Yes ($abs_path/wp-content/uploads/matomo/tmp)
    * Matomo Version: 4.4.1
    * Matomo Blog idSite: 1
    * Matomo Install Version: No (Install date: 2020-05-05 10:19:55)
    * Upgrades outstanding: No
    * Upgrade in progress: No
    
    ## Endpoints
    
    * Matomo JavaScript Tracker URL:  ($site_url/wp-content/uploads/matomo/matomo.js)
    * Matomo JavaScript Tracker - WP Rest API:  ($site_url/wp-json/matomo/v1/hit/)
    * Matomo HTTP Tracking API:  ($site_url/wp-content/plugins/matomo/app/matomo.php)
    * Matomo HTTP Tracking API - WP Rest API:  ($site_url/wp-json/matomo/v1/hit/)
    
    ## Crons
    
    * Server time: 2021-09-30 04:28:02
    * Blog time: 2021-09-30 06:28:02 (Below dates are shown in blog timezone)
    * Sync users & sites: Next run: 2021-09-30 10:19:54 (3 hours 51 min) ( Last started: 2021-09-29 10:20:33 (-20 hours 7 min). Last ended: 2021-09-29 10:20:33 (-20 hours 7 min). Interval: daily)
    * Archive: Next run: 2021-09-30 06:55:58 (27 min 56s) ( Last started: 2021-09-30 06:07:51 (-20 min 11s). Last ended: 2021-09-30 06:08:07 (-19 min 55s). Interval: hourly)
    * Update GeoIP DB: Next run: 2021-10-27 10:19:54 (27 days 3 hours) ( Last started: 2021-09-27 10:22:53 (-2 days 20 hours). Last ended: 2021-09-27 10:22:57 (-2 days 20 hours). Interval: matomo_monthly)
    
    ## Mandatory checks
    
    * PHP version >= : ok 
    * PDO extension: ok 
    * PDO\MYSQL extension: ok 
    * MYSQLI extension: ok 
    * Other required extensions: ok 
    * Required functions: ok 
    * Required PHP configuration (php.ini): ok 
    * Directories with write access: ok 
    
    ## Optional checks
    
    * Tracker status: ok 
    * Memory limit: ok 
    * Time zone: ok 
    * Open URL: ok 
    * PageSpeed disabled: ok 
    * GD > 2.x + Freetype (graphics): ok 
    * Other extensions: ok 
    * Warning Other functions: warning  (shell_exec You need to enable this built-in function. set_time_limit On a high traffic website, executing the archiving process may require more time than currently allowed. If necessary, change the max_execution_time directive in your php.ini file. mail parse_ini_file glob gzopen md5_file )
    * Filesystem: ok 
    * Last Successful Archiving Completion: ok 
    * Database abilities: ok 
    * Warning Max Packet Size: warning  (It is recommended to configure a 'max_allowed_packet' size in your MySQL database of at least 64MB. Configured is currently 16MB. )
    * Geolocation: ok 
    * Update over HTTPS: ok 
    * Supports Async Archiving: No
    * Location provider ID: geoip2php
    * Location provider available: Yes
    * Location provider working: Yes
    * Had visit in last 5 days: Yes
    * Matomo URL: Yes ($site_url/wp-content/plugins/matomo/app/)
    
    ## Matomo Settings
    
    * Track mode: default
    * Track codeposition: footer
    * Track api endpoint: default
    * Track js endpoint: default
    * Version history: 4.4.2, 4.4.1, 4.3.1, 4.3.0, 4.2.0
    * Core version: 4.4.1
    * Last tracking settings update: 1631886524
    * Last settings update: 1632911522
    * Show get started page: 0
    * Track ecommerce: No
    * Track 404: Yes
    * Delete all data uninstall: No
    
    ## Logs
    
    * None: 
    
    # WordPress
    
    * Home URL: $site_url
    * Site URL: $site_url
    * WordPress Version: 5.8.1
    * Number of blogs: 5
    * Multisite Enabled: Yes
    * Network Enabled: Yes
    * WP_DEBUG: No
    * WP_DEBUG_DISPLAY: Yes
    * WP_DEBUG_LOG: No
    * DISABLE_WP_CRON: -
    * FORCE_SSL_ADMIN: Yes
    * WP_CACHE: No
    * CONCATENATE_SCRIPTS: -
    * COMPRESS_SCRIPTS: -
    * COMPRESS_CSS: -
    * ENFORCE_GZIP: -
    * WP_LOCAL_DEV: -
    * WP_CONTENT_URL: $site_url/wp-content
    * WP_CONTENT_DIR: $abs_path/wp-content
    * UPLOADS: -
    * BLOGUPLOADDIR: -
    * DIEONDBERROR: -
    * WPLANG: -
    * ALTERNATE_WP_CRON: -
    * WP_CRON_LOCK_TIMEOUT: 60
    * WP_DISABLE_FATAL_ERROR_HANDLER: -
    * MATOMO_SUPPORT_ASYNC_ARCHIVING: -
    * MATOMO_TRIGGER_BROWSER_ARCHIVING: -
    * MATOMO_ENABLE_TAG_MANAGER: -
    * MATOMO_SUPPRESS_DB_ERRORS: -
    * MATOMO_ENABLE_AUTO_UPGRADE: -
    * MATOMO_DEBUG: -
    * MATOMO_SAFE_MODE: -
    * MATOMO_GLOBAL_UPLOAD_DIR: -
    * MATOMO_LOGIN_REDIRECT: -
    * Permalink Structure: /blog/%postname%/
    * Possibly uses symlink: No
    * Upload base url: $site_url/wp-content/uploads
    * Upload base dir: $abs_path/wp-content/uploads
    * Upload url: $site_url/wp-content/uploads/2021/09
    * Custom upload_path: 
    * Custom upload_url_path: 
    * Compatible content directory: Yes
    
    # WordPress Plugins
    
    * Akismet Anti-Spam: 4.1.12
    * Altmetric embeds: 0.0.7
    * Download Monitor: 4.4.4
    * Google XML Sitemaps: 4.1.1
    * Hide WP Toolbar: 2.4.2
    * Matomo Analytics - Ethical Stats. Powerful Insights.: 4.4.2
    * Multisite Enhancements: 1.6.1 (Network enabled)
    * Simple Lightbox: 2.8.1
    * User Activation Keys: 4.6 (Network enabled)
    * User Role Editor: 4.60.2
    * Widget Logic: 5.10.4
    * WP Fastest Cache: 0.9.4
    * Zotpress: 7.2
    * Active Plugins: 2 (Altmetric-WordPress-Plugin-master download-monitor)
    * Theme: primer
    
    # Server
    
    * Server Info: Apache
    * PHP OS: Linux
    * PHP Version: 7.4.21
    * PHP SAPI: fpm-fcgi
    * PHP Binary Name: php-fpm
    * PHP Error Reporting: 0 After bootstrap: 0
    * Timezone: UTC
    * WP timezone: Europe/Amsterdam
    * Locale: en_GB
    * User Locale: en_GB
    * Memory Limit: 256M (At least 128MB recommended. Depending on your traffic 256MB or more may be needed.)
    * WP Memory Limit: 256M
    * WP Max Memory Limit: 256M
    * Timezone version: 2021.1
    * Time: 1632976082
    * Max Execution Time: 120
    * Max Post Size: 128M
    * Max Upload Size: 32768000
    * Max Input Vars: 5000
    * Disabled PHP functions: Yes (apache_child_terminate,apache_get_modules,apache_note,apache_setenv,dl,exec,passthru,shell_exec,opcache_reset,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,popen,pclose,virtual,set_time_limit,posix_access,posix_ctermid,posix_get_last_error,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_initgroups,posix_isatty,posix_kill,posix_mkfifo,posix_mknod,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname,posix_uname,posix_setrlimit,lchgrp,lchown,lstat,symlink,link,readlink,linkinfo,syslog,openlog,closelog,pfsockopen)
    * zlib.output_compression is off: Yes
    * Curl Version: 7.52.1, OpenSSL/1.0.2u
    * Suhosin installed: No
    
    # Database
    
    * MySQL Version: 5.5.5
    * Mysqli Connect: Yes
    * Force MySQL over Mysqli: No
    * DB Prefix: wp_
    * DB CHARSET: utf8
    * DB COLLATE: 
    * SHOW ERRORS: No
    * SUPPRESS ERRORS: No
    * Uses Socket: No
    * Uses IPv6: No
    * Matomo tables found: 146
    * DB tables exist: Yes
    * Matomo users found: 1
    * Matomo sites found: 1
    * Required permissions: OK
    
    # Browser
    
    * Browser:  (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36)
    * Language: en,nl,en-us,de,vi
    
    
    Thread Starter Mark

    (@codeispoetry)

    Curious what your thoughts are! Also I can add a Matomo user on the site if that’s useful for diagnostics.

    hi @codeispoetry

    The problem is the default account in a multisite mode is not an administrator account but a super admin account. So you try to exclude a profile which is not yours.

    Our plugin does not allow to exclude the super admin accounts for now.
    I’ve created this issue https://github.com/matomo-org/matomo-for-wordpress/issues/523. Feel free to subscribe it to get the updates.

    Kind regards

    Mat

    Thread Starter Mark

    (@codeispoetry)

    Well that explains it I guess. (Though shouldn’t checking the “Matomo Super User” role then still have had an effect? I.e. if I check the roles my admin account has, superuser_matomo is there, and on the Matomo exclusions page, I’ve checked “Matomo Superuser” alongside all others. It is very counterintuitive if even that doesn’t work.)

    Anyway glad to see a fix is on the way!

    Hi @codeispoetry

    I flag this topic has resolved.
    Please subscribe to the issue to get notifications when it will be solved.
    Happy analytics.

    Mat

    Hi @codeispoetry

    the issue has been fixed. You’ll get it in the next release of the plugin.
    Kind regards

    Mat

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Exclusions by user role don’t seem to work reliably’ is closed to new replies.