Hi Jethro,
Thank you for your message and your much-appreciated support. I’m glad that Tracktastic can be a useful plugin and that overall the tracking seems to work for you 🙂
As for me, with a site using the plugin, when I go to Matomo reports > E-Commerce > Products, I do see values appearing in each subreport.
The same goes for the Sales report. It seems to come from your configuration.
After checking the source code of the indicated page, I don’t see the Tracktastic tracking script on the product page, whereas it is present on the cart, which might explain why the data is not coming through properly. Tracktastic should also work for variable products (I have some on a site I track and everything is recorded correctly).
- Can you confirm that the product pages are displayed in a standard way using the CPT products and that it is not a static page?
- Could you check how the Matomo tracking script has been installed? I don’t see it on the product page either.
Thanks again, looking forward to your reply.
Killian
Hi Killian,
Thank you very much for the time and care you took in reading my previous message — I really appreciate the detailed response.
I did find the Tracktastic code in the source of the product page, and I’ll share that below along with the concerns I have after some investigation.
I’ve attached a few screenshots to help illustrate what I’m seeing on my side:
Link to screenshots:
https://imgur.com/a/KFJslz3
Screenshots 1–3:
These show that product-level data isn’t being populated correctly, even though total orders are being recorded.
Screenshot 1: Reports → Ecommerce → Products
Screenshot 2: Reports → Ecommerce → Sales
Screenshot 3: Ecommerce Overview
In all three locations, the revenue/transaction totals appear, but individual product information is missing.
Screenshot 4:
This shows my Matomo settings, where both Auto-Tracking and Ecommerce Tracking are enabled. Tracktastic itself doesn’t seem to have any settings in the WordPress dashboard (it seems entirely automatic), but please let me know if there is a configuration area I may have overlooked.
Screenshots 5–7:
These show the page source of a product page, where both the Matomo script and the Tracktastic script are loading correctly.
Screenshot 5: The Matomo tracking script
Screenshot 6: The Tracktastic script
Screenshot 7: Feedback I received noting that the Tracktastic script is outputting an empty SKU value.
That part is correct — I haven’t set SKUs for any products, since my clients don’t use internal SKU systems. My understanding was that product IDs would be sufficient. However, the feedback I received suggested that Matomo may rely more heavily on SKUs for product-level attribution. If SKU is required for Tracktastic to send full product data to Matomo, please confirm so I can update all products accordingly.
If you could clarify whether the missing SKU is the reason the product-level tracking isn’t appearing, or whether there may be another issue in how Tracktastic passes product data to Matomo, that would be really helpful.
Thanks again for your time — much appreciated!
Kind regards,
Jethro
Matomo Script on Product Page:
<!-- Matomo --><script>
(function () {
function initTracking() {
var _paq = window._paq = window._paq || [];
_paq.push(['enableJSErrorTracking']);_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['alwaysUseSendBeacon']);_paq.push(['setTrackerUrl', "\/\/greenawaysointments.co.za\/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="\/\/greenawaysointments.co.za\/wp-content\/uploads\/matomo\/matomo.js"; s.parentNode.insertBefore(g,s);
}
if (document.prerendering) {
document.addEventListener('prerenderingchange', initTracking, {once: true});
} else {
initTracking();
}
})();
</script>
<!-- End Matomo Code -->
Tracktastic Script on Product Page
<script id="tracktastic-product-tracking-js-extra">var tracktasticProductData = {"sku":"","name":"Baby\\'s Balm","categoryList":"Uncategorized","price":"60"};</script><script src="https://greenawaysointments.co.za/wp-content/plugins/tracktastic/includes/js/matomo-product-tracking.js" id="tracktastic-product-tracking-js"></script>