Closed perlguy99 closed 8 years ago
I've been using this code a bit more and have noticed some more details about this...
If I have debug on, it appears like things should be working as designed.
However, with debug off, my calls to "sendView" and "sendViews" seem to not reach our Piwik server most of the time.
If I add a call to "dispatch" after EACH "sendView" or "sendViews" method call, then it looks like most/all of the data gets to the Piwik server.
Does anyone have any ideas on how to debug the dispatcher a bit more to see if there actually IS a problem and if so, how to fix it?
Thanks!
I am just swamped with work. I will take a took in a few days, promise.
When I look quickly at the logs above the http repose code "200" indicates that the request is reaching the PiwikServer and the server is returning 200.
Then the question is what happens inside the PiwikServer. "200" does not mean much more then that the request is received, not that the parameters are valid.
Do you have the possibility to try the following this: -Create a new Site in the PiwikServer and send events to this one. Some problems as before? I think I recall having had problems and creating a new site gets everything going again. -If possible (and if you have the patience) try installing a local copy of the PiwikServer This will give you more control of troubleshooting. There are ways to look inte what happens in the PiwikServer. -Check the version of your PiwikServer and post here -Maybe there are some characters or encoding that the server does not like (depending on your screen name). Does it happen for the same screen always or is it random?
I will have a look at the dispatcher and give you some code to track/count success and fails to see if the issue is on the client or server.
(After 5 minutes of thinking).
If you only have one tracking event when sending to the PiwikServer it will be send as a GET request. If you have more then one event they will be send as a bulk request in a POST request.
There was a change in the PiwikServer how the events were encoded in the POST request. I needed to bump the SDK to follow that change.
It would be great if you could provide the SDK version and PiwikServer version.
I'll take a look at things tomorrow and update this thread.
Sent from my iPhone
On Feb 18, 2015, at 16:33, Mattias Levin notifications@github.com wrote:
(After 5 minutes of thinking).
If you only have one tracking event when sending to the PiwikServer it will be send as a GET request. If you have more then one event they will be send as a bulk request in a POST request.
There was a change in the PiwikServer how the events were encoded in the POST request. I needed to bump the SDK to follow that change.
It would be great if you could provide the SDK version and PiwikServer version.
— Reply to this email directly or view it on GitHub.
Using Piwik 2.10.0 SDK - I think it is v3.1.1. I downloaded it on 02/12/15.
Going to try a new site next. Thank you!
Ok. WithOUT the calls to "dispatch" each time, I see that the items are being sent via a POST request.
The result that I get back is:
2015-02-19 08:41:55.604 GEOINT Apps[1068:640792] -[AFNetworkActivityLogger networkRequestDidFinish:] => 200 'https://gasmetrics2.cticore.com/piwik/piwik.php/' [0.0961 s]: {
"Access-Control-Allow-Credentials" = true;
"Access-Control-Allow-Origin" = "*";
"Content-Length" = 32;
"Content-Type" = "application/json";
Date = "Thu, 19 Feb 2015 14:42:10 GMT";
Server = "Apache/2.2.15 (Red Hat)";
"X-Cnection" = close;
"X-Powered-By" = "PHP/5.3.3";
} {
status = success;
tracked = 0;
}
However, out of 3 executions of the program, and visiting every page in the application, only 1 page hit was actually registered and show up in the Piwik server.
And, this was on a new Piwik site that I just created for this test.
Hi @perlguy99
Could you upgrade to latest Piwik and try again? If you still have the problem, please open a new issue, and post there the list of request URLs to piwik.php
.
If there is a better place for me to post this question, please let me know.
I've been experimenting with this code for a few days now and I am running into instances where I am sending a "sendView" to the piwik server, yet the piwik server is not registering it for some reason...
It is very possible the I just don't fully understand how everything works yet - but I wanted to see if anyone else has seen this behavior.
Below is my AFNetworking debug output.