The database table "report_viewed_product_index" is updated each time a product is viewed on the front-end. I have noticed many problems regarding the way this table is updated:
Due to the above problems, the table "report_viewed_product_index":
Hello @dandrikop
Magento 2 "Report Viewed Products" doesn't work correctly, it can be due to several issues. Follow below steps for troubleshooting:
Check Cron Jobs:
php bin/magento cron:install php bin/magento cron:run
Clear Cache:
php bin/magento c:c php bin/magento c:f
Reindexing Data:
php bin/magento i:rei php bin/magento c:f
Configuration Settings:
Ensure that the reports are enabled in the Magento admin panel. Go to Stores > Configuration > General > Reports and check the settings.
Logs and Debugging:
Enable developer mode to get more detailed.
php bin/magento deploy:mode:set developer php bin/magento s:s:d -f php bin/magento c:f
Check the Magento log files:
File Path: Magento Root/var/log/
Database Integrity:
Run the Magento database repair command to check and fix any database related issues:
php bin/magento setup:db-schema:upgrade php bin/magento setup:db-data:upgrade
Run All magento standard commands:
php bin/magento s:up php bin/magento s:d:c php bin/magento s:s:d -f php bin/magento i:rei php bin/magento c:f
Hope it helps !
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9