Hello,
I’m using the Matomo plugin on a WordPress website where Angular is also included (thanks to Web Components). I would like to track, for example, when a product page is visited with my Angular application (using the methods available in the tracking API such as setReferrerUrl(), setEcommerceView() …). But the problem is that I don’t know how to link my e-commerce products to Matomo. In order, for example, that Matomo understands which product is visited when I use the setEcommerceView method (the first parameter must be the “productSKU” which must be linked to the id of my product in the API). I don’t use WooCommerce and my products are stored in an API I have access to (source code too). This problem prevents me from having statistics of product pages visited, and actions such as adding to cart, payment, etc… in the “E-Commerce” section of the Matomo plugin.
Tracking is done using the ngx-matomo library for Angular.
For example, when a user goes to a product page, three calls are made:
setReferrerUrl() with the current URL as a parameter
setEcommerceView() with product ID, product name, product category, product price in parameters
trackPageView() with the product name as a parameter
The page visit is tracked and I can see it in the Matomo plugin “Visits” section.
But the product is not tracked: there is no data on the Matomo admin (E-Commerce section).
Anyone have a solution to this?
Archive: Next run: 2022-10-12 23:38:52 (15 min 12s) ( Last started: 2022-10-12 22:38:52 (-44 min 48s). Last ended: 2022-10-12 22:38:56 (-44 min 44s). Interval: hourly)
Update GeoIP DB: Next run: 2022-10-13 10:39:26 (11 heures 15 min) ( Last started: 2022-09-13 10:39:29 (-29 jours 12 heures). Last ended: 2022-09-13 10:39:30 (-29 jours 12 heures). Interval: matomo_monthly)
You don’t have any archiving error so far.
Just wondering, where do you expect to see your product data in Matomo?
Where are for you the product data missing?
Finally my calls were working fine. The data generated by the setEcommerceView() method is displayed only the day after its call on Matomo Plugin. This information was not written anywhere. Sorry for the waste of time.
The archiving process is executed every hour. So you should see your data sooner than the next day.
Maybe your wordpress cron does not work correctly?
You can try to add in your wp-config.php file the following content:
if (!defined('MATOMO_SUPPORT_ASYNC_ARCHIVING')) {
define('MATOMO_SUPPORT_ASYNC_ARCHIVING', false);
}
Then your archiving will not be executed any more from a crontab: they will be generated on the fly when you open a Matomo page.
Let me know if it renders your data displayed earlier.
Archive: Next run: 2022-10-17 23:38:52 (7 min 22s) ( Last started: 2022-10-17 22:38:58 (-52 min 32s). Last ended: 2022-10-17 22:39:01 (-52 min 29s). Interval: hourly)
Update GeoIP DB: Next run: 2022-11-12 10:39:26 (25 jours 11 heures) ( Last started: 2022-10-13 10:39:32 (-4 jours 12 heures). Last ended: 2022-10-13 10:39:34 (-4 jours 12 heures). Interval: matomo_monthly)
Mandatory checks
Version PHP >= : ok
PDO Extension: ok
PDO\MYSQL Extension: ok
MYSQLI Extension: ok
Autres extensions requises: ok
Fonctions requises: ok
Configuration PHP requise (php.ini): ok
Répertoires avec les droits d’accès en écriture: ok
Répertoires avec accès en écriture pour Gestionnaire de balises: ok
Warning archive_main: 2022-10-14 14:39:20 (4 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:625; CronArchive.php:618; CronArchive.php:280; Access.php:670; CronArchive.php:284; ScheduledTasks.php:332; class-wp-hook.php:305; class-wp-hook.php:331; plugin.php:524; wp-cron.php:138;)
Warning archive_errors: 2022-10-14 14:39:20 (‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-10-14&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2022-10-10&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2022-10-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2022-01-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘4 total errors during this script execution, please investigate and try and fix these errors.’ => ScheduledTasks.php:345; class-wp-hook.php:305; class-wp-hook.php:331; plugin.php:524; wp-cron.php:138;)
Warning archive_main: 2022-10-17 11:39:04 (4 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:625; CronArchive.php:618; CronArchive.php:280; Access.php:670; CronArchive.php:284; ScheduledTasks.php:332; class-wp-hook.php:305; class-wp-hook.php:331; plugin.php:524; wp-cron.php:138;)
Warning archive_errors: 2022-10-17 11:39:04 (‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-10-17&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2022-10-17&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2022-10-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2022-01-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘4 total errors during this script execution, please investigate and try and fix these errors.’ => ScheduledTasks.php:345; class-wp-hook.php:305; class-wp-hook.php:331; plugin.php:524; wp-cron.php:138;)
Warning archive_main: 2022-10-17 12:38:58 (4 total errors during this script execution, please investigate and try and fix these errors. => CronArchive.php:625; CronArchive.php:618; CronArchive.php:280; Access.php:670; CronArchive.php:284; ScheduledTasks.php:332; class-wp-hook.php:305; class-wp-hook.php:331; plugin.php:524; wp-cron.php:138;)
Warning archive_errors: 2022-10-17 12:38:58 (‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=day&date=2022-10-17&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=week&date=2022-10-17&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=month&date=2022-10-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2022-01-01&format=json&trigger=archivephp. Response was ‘{“result”:“error”,“message”:“Token is not valid.”}’’ ‘4 total errors during this script execution, please investigate and try and fix these errors.’ => ScheduledTasks.php:345; class-wp-hook.php:305; class-wp-hook.php:331; plugin.php:524; wp-cron.php:138;)
WordPress
Home URL: $site_url
Site URL: $site_url
WordPress Version: 6.0.1
Number of blogs: 1
Multisite Enabled: No
Network Enabled: No
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/content
WP_CONTENT_DIR: $abs_path/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: /%postname%/
Possibly uses symlink: No
Upload base url: $site_url/content/uploads
Upload base dir: $abs_path/content/uploads
Upload url: $site_url/content/uploads/2022/10
Custom upload_path:
Custom upload_url_path:
Compatible content directory: Yes
WordPress Plugins
Categories Images: 3.0.1
Conditional Display for Mobile by WonderPlugin: 1.2
I can see two problems.
First, in your configuration, it does not seem that the code I gave you has been applied. Is it in your wp-config.php file?
Secondly, when archiving, the logs show that there is an error: token is not valid. Do you use a proxy cache or a CDN on your website?
Hi,
Salt Peaky here,
I also using the Matomo plugin on a WordPress website where Angular is also included in Wordpress site wordle spanish, and when I’m logged into my Matomo dashboard, I do not see the “Platform > Marketplace” as any option in the left sidebar menu.
hi
I am using Matomo plugin on my tool-based website which is about downloading Pinterest videos. my experience with this plugin is very good, latest updates improve it a lot
thanks