• Resolved wolfweb95

    (@wolfweb95)


    Hello I have an multisite where I have installed matomo and configured the tracking code manually, due to german gdpr and use of an cookie banner.

    Now the tracking only works on the main page, the subdomains from the multisite are not tracking. On Console I got following error on the subdomains: matomo.js:36 POST https://mywebsite.de/wp-content/plugins/matomo/app/matomo.php?action_name=… 400

    Like on your website described I replaced the API-Endpoint and JS-Endpoint with the full url. See attached:

    <!-- Matomo --><script>
    var _paq = window._paq = window._paq || [];
    _paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);_paq.push(['setTrackerUrl', "https://gr.mywebsite.de\/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://gr.mywebsite.de\/wp-content\/uploads\/matomo\/matomo.js"; s.parentNode.insertBefore(g,s);
    </script>
    <!-- End Matomo Code -->

    Could you please assist me where is the problem?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support emermatomo

    (@emermatomo)

    Hi @wolfweb95 Could you please share to us a copy of your system check report so we can investigate on this further?

    Thread Starter wolfweb95

    (@wolfweb95)

    sure:

    				  # Errors
    
    * Error PHP cli Version:  (Your PHP cli version is not compatible with the <a  target="_blank">Matomo requirements</a>. Please upgrade your PHP cli version, otherwise, you might have some archiving errors)
    * Error MySQLi support: missing (Your PHP cli does not load the MySQLi extension. You might have archiving problems in Matomo but also others problems in your WordPress cron tasks. You should enable this extension)
    
    # Matomo
    
    * Matomo-Plugin-Version: 4.15.1
    * Config existiert und ist schreibbar.: Ja ("$abs_path/wp-content/uploads/sites/2/matomo/config/config.ini.php" )
    * JS Tracker existiert und ist schreibbar.: Ja ("$abs_path/wp-content/uploads/sites/2/matomo/matomo.js" )
    * Plugin-Verzeichnisse: Yes ([{"pluginsPathAbsolute":"$abs_path\/wp-content\/plugins\/matomo\/plugins","webrootDirRelativeToMatomo":"..\/"}])
    * Tmp-Verzeichnis schreibbar: Yes ($abs_path/wp-content/uploads/sites/2/matomo/tmp)
    * Matomo-Version: 4.15.1
    * Matomo Blog idSite: 1
    * Installierte Matomo-Version: 4.12.0 (Install date: 2022-12-06 14:42:37)
    * Upgrades outstanding: No
    * Upgrade in progress: No
    
    ## Endpoints
    
    * Matomo JavaScript Tracker URL:  ($site_url/wp-content/uploads/sites/2/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-Zeit: 2023-09-20 08:10:13
    * Blog-Zeit: 2023-09-20 10:10:13 (Die nachfolgenden Daten werden in der Blog-Zeitzone angezeigt)
    * Sync users & sites: Next run: 2023-09-20 18:01:11 (7 ?ρε? 50 λεπτ?) ( Last started: 2023-09-19 21:46:21 (-12 ?ρε? 23 λεπτ?). Last ended: 2023-09-19 21:46:21 (-12 ?ρε? 23 λεπτ?). Interval: daily)
    * Archive: Next run: 2023-09-20 11:05:02 (54 λεπτ? 49 δευτερ?λεπτα) ( Last started: 2023-09-20 10:10:05 (-8 δ). Last ended: 2023-09-20 10:10:05 (-8 δ). Interval: hourly)
    * Update GeoIP DB: Next run: 2023-10-02 18:01:11 (12 μ?ρε? 7 ?ρε?) ( Last started: 2023-09-02 21:42:32 (-17 μ?ρε? 12 ?ρε?). Last ended: 2023-09-02 21:42:33 (-17 μ?ρε? 12 ?ρε?). Interval: matomo_monthly)
    
    ## Vorgeschriebene Prüfungen
    
    * ?κδοση PHP >= 7.2.5: ok 
    * PDO επ?κταση: ok 
    * PDO\MYSQL επ?κταση: ok 
    * MYSQLI επ?κταση: ok 
    * ?λλε? απαιτο?μενε? επεκτ?σει?: ok 
    * Απαιτο?μενε? συναρτ?σει?: ok 
    * Απαιτο?μενη παραμετροπο?ηση PHP (php.ini): ok 
    * Υποφ?κελοι με δικα?ωμα εγγραφ??: ok 
    
    ## Optionale Prüfungen
    
    * 64-bit Εκτελ?σιμο PHP: ok 
    * Κατ?σταση Ανιχνευτ?: ok 
    * ?ριο μν?μη?: ok 
    * Ζ?νη ?ρα?: ok 
    * ?νοιγμα URL: ok 
    * GD > 2.x + FreeType (γραφικ?): ok 
    * ?λλε? επεκτ?σει?: ok 
    * ?λλε? συναρτ?σει?: ok 
    * Σ?στημα αρχε?ων: ok 
    * Τελευτα?α Επιτυχ?? Εκτ?λεση Αρχειοθ?τηση?: ok 
    * Δυνατ?τητε? β?ση? δεδομ?νων: ok 
    * Warning Μ?γιστο Μ?γεθο? Πακ?του: warning  (Προτε?νεται να ρυθμ?σετε το μ?γεθο? του 'max_allowed_packet' στη β?ση MySQL τουλ?χιστον σε 64MB. Αυτ? τη στιγμ? ε?ναι ρυθμισμ?νο σε 16MB. )
    * Γεωτοποθεσ?α: ok 
    * Ενημ?ρωση μ?σω HTTPS: ok 
    * Supports Async Archiving: No
    * Location provider ID: geoip2php
    * Location provider available: Yes
    * Location provider working: Yes
    * Warning Proxy header: HTTP_X_REAL_IP (A proxy header is set which means you maybe need to configure a proxy header in the Advanced settings to make location reporting work. If the location in your reports is detected correctly, you can ignore this warning. <a  target="_blank">Mehr erfahren</a>)
    * Matomo URL: Yes ($site_url/wp-content/plugins/matomo/app)
    
    ## Matomo Settings
    
    * Track mode: disabled
    * Track codeposition: header
    * Track api endpoint: default
    * Track js endpoint: default
    * Version history: 4.15.1, 4.15.0, 4.14.2, 4.14.1, 4.13.5
    * Core version: 4.15.1
    * Last tracking settings update: 1695044599
    * Last settings update: 1695044599
    * Show get started page: 0
    * Track ecommerce: No
    * Mail history: 2023-09-18 00:43:22, 2023-09-11 00:51:32, 2023-09-04 00:43:04
    
    ## Logs
    
    * Keine: 
    
    # WordPress
    
    * Home URL: $site_url
    * Site URL: $site_url
    * WordPress Version: 6.3.1
    * Number of blogs: 9
    * 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: Yes
    * CONCATENATE_SCRIPTS: No
    * 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: /%category%/%postname%/
    * Possibly uses symlink: No
    * Upload base url: $site_url/wp-content/uploads/sites/2
    * Upload base dir: $abs_path/wp-content/uploads/sites/2
    * Upload url: $site_url/wp-content/uploads/sites/2
    * Custom upload_path: 
    * Custom upload_url_path: 
    * Compatible content directory: Yes
    
    # WordPress Plugins
    
    
    ## MU Plugins
    
    * GeoDirectory Fast AJAX: 1.0.0
    
    ## Plugins
    
    * Better REST API Featured Images: 1.2.1
    * Borlabs Cookie - Cookie Opt-in: 2.2.66
    * Embed Calendly: 3.6
    * eRecht24 legal texts for WordPress: 3.3.9
    * Float Menu Lite: 5.1
    * Fluent Forms: 5.0.9
    * Fluent Forms Pro Add On Pack: 5.0.7
    * FluentSMTP: 2.2.5
    * GeoDirectory: 2.3.23
    * GeoDirectory Advanced Search Filters: 2.3.1
    * Jobs for WordPress: 2.6.2
    * JSON Basic Authentication: 0.1
    * Matomo Analytics - Ethical Stats. Powerful Insights.: 4.15.1
    * NinjaFirewall (WP Edition): 4.5.9 (Network enabled)
    * Rank Math SEO: 1.0.201.1
    * Salient Core: 1.9.6
    * Salient WPBakery Page Builder: 6.9.1
    * Simple Local Avatars: 2.7.5
    * WPML Media: 2.7.3
    * WPML Multilingual CMS: 4.6.6
    * WPML SEO: 2.1.0
    * WPML String Translation: 3.2.8
    * Yoast Duplicate Post: 4.5
    * Active Plugins: 1 (embed-calendly-scheduling)
    * Theme: salient (child)
    
    # Server
    
    * Server Info: Apache
    * Apache AddHandler support: Supported
    * PHP OS: Linux
    * PHP Version: 8.0.30
    * PHP SAPI: fpm-fcgi
    * PHP Binary Name: /opt/plesk/php/8.0/sbin/php-fpm
    * PHP Maxmind DB extension: Not loaded
    * PHP Error Reporting: 4437 After bootstrap: 4437
    * Timezone: UTC
    * WP timezone: Europe/Berlin
    * Locale: de_DE
    * User Locale: de_DE
    * 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: 0.system
    * Time: 1695197413
    * Max Execution Time: 30
    * Max Post Size: 16M
    * Max Upload Size: 16384000
    * Max Input Vars: 1000
    * Disabled PHP functions: Yes (opcache_get_status)
    * zlib.output_compression is off: Yes
    * Curl Version: 7.61.1, OpenSSL/1.1.1k
    * Suhosin installed: No
    
    # PHP cli
    
    * Error PHP cli Version:  (Your PHP cli version is not compatible with the <a  target="_blank">Matomo requirements</a>. Please upgrade your PHP cli version, otherwise, you might have some archiving errors)
    * Error MySQLi support: missing (Your PHP cli does not load the MySQLi extension. You might have archiving problems in Matomo but also others problems in your WordPress cron tasks. You should enable this extension)
    
    # Database
    
    * MySQL Version: 10.3.35
    * Mysqli Connect: Yes
    * Force MySQL over Mysqli: No
    * DB Prefix: u8bo8_2_
    * DB CHARSET: utf8
    * DB COLLATE: 
    * SHOW ERRORS: No
    * SUPPRESS ERRORS: No
    * Uses Socket: No
    * Uses IPv6: No
    * Matomo tables found: 95
    * DB tables exist: Yes
    * Matomo users found: 7
    * Matomo sites found: 1
    * Erforderliche Berechtigungen: OK
    
    # Browser
    
    * Browser:  (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36)
    * Language: de,en-gb,en-us,en
    
    	
    Plugin Support emermatomo

    (@emermatomo)

    Hi @wolfweb95 Upon reviewing the system check report, the Error with PHP cli Version needs to be address. To do that, please follow the troubleshooting steps on this guide: How to solve the error message “Your PHP CLI version is not compatible with the Matomo requirements”

    I hope this helps. If there is anything else we can assist you with, please don’t hesitate to let us know.

    Thread Starter wolfweb95

    (@wolfweb95)

    Sorry for the late response but this does not help. I contacted the hosting and he told me following path: /opt/plesk/php/8.0/bin/php

    I make the changes in the file but the error for the php cli version is still there.

    Thread Starter wolfweb95

    (@wolfweb95)

    So?

    Plugin Support emermatomo

    (@emermatomo)

    Hello @wolfweb95. I do apologize for the late response.

    Could you please try the troubleshooting steps on this link:
    https://matomo.org/faq/wordpress/how-can-i-configure-the-tracking-code-manually-when-i-have-wordpress-network-enabled-in-multisite-mode/

    Please let us know how it goes.

    Thread Starter wolfweb95

    (@wolfweb95)

    <!-- Matomo --><script>
    var _paq = window._paq = window._paq || [];
    _paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);_paq.push(['setTrackerUrl', "\/\/website.de\/wp-content\/plugins\/matomo\/app\/matomo.php"]);_paq.push(['setSiteId', '3']);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.src="\/\/website.de\/wp-content\/uploads\/matomo\/matomo.js"; s.parentNode.insertBefore(g,s);
    </script>
    <!-- End Matomo Code -->

    This is what I have on the sites

    Thread Starter wolfweb95

    (@wolfweb95)

    This doesn’t make any sense. On the Main-Website its working but on the other multi-sites with the sub-domains the tracking is not working. Could you please tell me what I can do?

    Plugin Support emermatomo

    (@emermatomo)

    Hi everyone. HPOS compatibility has been released for Matomo 4 users in WooCommerceAnalytics 4.0.7. If you are encountering any issues, please let us know.

    Plugin Support emermatomo

    (@emermatomo)

    Hello again. Please ignore my previous post. @wolfweb95, is it possible to get the full tracking URL (the one for the request to matomo.php) both for the request that succeeds and the one that fails? (without any token_auths)

    Thread Starter wolfweb95

    (@wolfweb95)

    its the same… I just copied it from the main page that worked. Is it possible to send you somewhere login creds so you can investigate further?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘POST 400 error on Multisite’ is closed to new replies.