Ecommerce sometimes tracking, but usually no

I have installed matomo on my own server, and I am very happy with the base tracking that works as expected.
The issue I have is with e-commerce: it sometimes work, but usually not and I’m completely out of ideas on how to find the reason and debug. I feel like it’s an option that is maybe missing?

Is there any problem in the order that it’s triggered?

<!DOCTYPE html>
<html lang="de-DE"  prefix="og: http://ogp.me/ns#"  itemscope itemtype="http://schema.org/WebPage">
	<head>
		
	
	<!-- Matomo -->
	<script>
		var _paq = window._paq = window._paq || [];
		/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
		_paq.push(['addEcommerceItem',"spaghetti"]);
		_paq.push(["trackEcommerceOrder","20240517-shezdejw",12.44,8.95,0.81,3.49,false]);
		_paq.push(['trackPageView']);
		_paq.push(['enableLinkTracking']);
	  (function() {
		var u="//matomo.mywebsite.de/";
		_paq.push(['setTrackerUrl', u+'matomo.php']);
		_paq.push(['setSiteId', '1']);
		var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
		g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
	  })();
	</script>
	<!-- End Matomo Code -->

	
	</head>
	

	<body>

		The website
		
	</body>
</html>

Hi @cyrga

Can you describe the symptoms?

Hi @heurteph-ei – the symptoms are:

  • The pagetracking works, because I see the visitors on them
  • The e-commerce sometimes triggers, but usually not: for instance, in matomo, I have 1-2 transactions a day, when in reality it is more like 10-20. I have no clue what could cause this, as when I look at the profiles, the successful transactions don’t have specific patterns in terms of browser or anything…

The only explanation I could have is that my aforementioned tracking is correctly fired in the right order, but I have no clue how to debug

Hi @cyrga
As first approach to find the origin of the problem, could you create a Goal in Matomo when the « Thank-you » page of the e-commerce transaction has been reached?
Then check when these transactions are not tracked whereas the page has been reached…