Not all goals are tracked from Piwik


my piwik is sometimes missing goals. I’ve got days where 10 to 50% of the goals are missing.

In the past I use the normal code an defined an URL. Two weeks ago I switched to the asyncron code an call the trackGoal(). There is no difference …

Any suggestion?

Thanks for your work!


Has no one else this problem? I use also the Google Analytics Code on the same page and there are all goals “available”.


Mike, there is a bug with Goals which maybe causes your problem: Goal matching regex - test for regression · Issue #1991 · matomo-org/matomo · GitHub

If not, then post more information (goal definition, what conversions are missing, numbers etc.)

Hi matthieu,

thanks for your response. I think the item from the bugtracker is not the problem. I don’t use URLs and some conversions are tracked.

The goal definition is (in german):
Ziel wird ausgelöst
wenn die besuchte Seiten einen Aufruf der Javascript-Methode piwikTracker.trackGoal() enthält (weitere Informationen)

=> goal will be triggerd if the JS-method piwikTracker.trackGoal() will be called.

This works in most cases, but not in all. I use the asyncron code, so it will be something like:

_paq.push(['trackGoal', '1', '11.95' ]);

I could not found any “reproducible” condition, which conversions are tracked and which not. :S


Try with this version of piwik.js

Thanks, it’s replaced now and I’ll report in the next days.

Short feedback: Until now, it looks very good. All goals have been tracked with the new piwik.js.

Perfect! The missing rate is now < 2%. (And that could be everything …)

Hi all,
I have same problem. Some goals are tracked and some are not. I took closer look on it and the result is:

  • apache log is OK. 100% of requests from clients side are recorded,
  • piwik_log_visit DB table is OK as well, 100% of records,
  • piwik_log_conversion DB table contains only couple of them (3 of 6).

I use manual JS API call with piwikTracker.trackGoal( 1, XX.XX ). Records are disappearing somewhere between piwik_log_visit and piwik_log_conversions tables so I do not think the problem is with piwik.js (on clients side)

Any hints???

Thank you for reply,

PS: It is happening since I upgraded from version 1.0 to 1.1.1. Now I’m running version 1.2.rc3 with completely new database backend (no old cookies, 100% new domain host) and still same result.

Romain, where do you call trackGoal ? Maybe it is called on a page that is not called on every conversion, or maybe not all users wait long enough for the beacon to load? try firing at the top of the page maybe

Thank you for reply. Unfortunately this is not my case. I can see all requests to web server (where piwik is running) in my apache logs what means that js script on clients side is working correctly.

here is the short example of my apache logs:

myWebhost XXX.XXX.XXX.XXX - - [22/Feb/2011:14:54:34 +0100] “GET /pw/piwik.php?idsite=1&rec=1&rand=0.5331560325696201&h=14&m=54&s=34& HTTP/1.1” 200 55 “http://the-site/index.php” “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; FBSMTWB; GTB6.6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; eSobiSubscriber”

myhost XXX.XXX.XXX.XXX - - [22/Feb/2011:15:51:22 +0100] “GET /pw/piwik.php?idsite=1&rec=1&rand=0.2546664823095828&h=15&m=51&s=8& HTTP/1.1” 200 55 “http://the-site/index.php” “Mozilla/5.0 (Windows; U; Windows NT 5.1; sk; rv: Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729)”

The first one was tracked but second one wasn’t and I can’t understand, why… ;-(

vas007: your declaration for “piwikTracker” is inside the try { } block, but you reference that variable outside the try {} block. Depending on the browser (and its javascript engine), this might be a scope problem and cause the piwikTracker.trackGoal() calls to fail.

vipsoft: Hi, as I can see there is no problem with JS script and piwikTracker.trackGoal() call. It works correctly otherwise the the http requests from the client (browser) to the web server (apache server where piwik application is hosted) wouldn’t come. But they do and they are even recorded in piwik_log_visit table but not recorded in piwik_log_conversions table, both tables are in piwik database. In this context, I want to ask you if is there any way how to debug SQL queries in piwik application? It would show something.

There’s a limit of one conversion per visit. Are you sure the visitor hasn’t already converted during that visit?