I’m currently testing if the Wordpress plugin works for one of my websites. I would like to track all my Woocommerce products via Content Tracking.
For this purpose I have included data-track-content in the product-loop in the div-elements shown as a preview.
At the end of the page where the product-loop is placedI have added the following:
var _paq = window._paq [];
_paq.push(['trackVisibleContentImpressions']);
_paq.push(['trackPageView']);
In the settings of the Wordpress plugin I tried the different options under ‘Enable content tracking’, but I see in the network analysis that the POST requests always have the status 500 and no tracking is visible in Matomo.
Could you send us a URL to a page where you have implemented this so we can take a look and possibly debug why it isn’t working? Feel free to email us at wordpress at matomo.org
Otherwise maybe you could paste an image of some of the HTML elements where this is set up so we can see if anything is missing. Eg making sure there are no typos, there is a content name and content piece set etc.
[Tue Apr 21 15:52:51.513287 2020] [php7:error] [pid 22218] [client X:52733] PHP Fatal error: Uncaught Error: Call to a member function autocommit() on null in /var/www/X/public_html/X/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPressTracker.php:184\nStack trace:\n#0 /var/www/X/public_html/X/wp-content/plugins/matomo/app/plugins/BulkTracking/Tracker/Handler.php(78): Piwik\Tracker\Db\WordPress->beginTransaction()\n#1 /var/www/X/public_html/X/wp-content/plugins/matomo/app/plugins/BulkTracking/Tracker/Handler.php(36): Piwik\Plugins\BulkTracking\Tracker\Handler->beginTransaction()\n#2 /var/www/X/public_html/X/wp-content/plugins/matomo/app/core/Tracker.php(134): Piwik\Plugins\BulkTracking\Tracker\Handler->onStartTrackRequests()\n#3 /var/www/X/public_html/X/wp-content/plugins/matomo/app/core/Tracker.php(112): Piwik\Tracker->track()\n#4 /var/www/X/public_htm in /var/www/X/public_html/X/wp-content/plugins/matomo/classes/WpMatomo/Db/WordPressTracker.php on line 184, referer: https:// X .de/praxistage/index.php/vorschau/
Tracking code is help to collect every code and display word press page . If this is not appear then you can check wordpress setting and tracking activation tab.
I have just updated the plugin to the latest version, but the error still occurs.
In Matomo I only get the same 4 of the actually displayed content blocks as impressions over and over again.
The POST parameters still look the same, the php error log now says
PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: https:// X /vorschau/
Although I have already increased max_input_vars to 1500.