Inconsistent Piwik response and no tracking - analytics

I am setting up Piwik on an IIS server. I have my website set up to properly load the Piwik tracking JS. I have the site configured in Piwik.
When I load the page in either IE or Safari, I get a 400 from Piwik, which is expected if the request is missing the tracking parameters, but my request isn't. It has siteid and the other parameters as GET query string parameters.
The same request from Chrome returns a 204, which is also expected, but the visit is not logged in Piwik.
I cannot find where I may have Piwik misconfigured, and I cannot figure out why IE/Safari are getting 400 when Chrome gets a 204.
What should I look at for fixing my Piwik installation to log the requests and not send back a 400 to IE/Safari?
I am using Piwik v2.13.1

Are you also passing &rec=1 parameter? To debug it further please enable tracker debug mode in config.ini.php:
[Tracker]
debug=1
With such configuration piwik.php resource should print relevant debug info.

Related

How is "No 'Access-Control-Allow-Origin' header" a server issue if I can turn on a CORS extension and it works?

I access a server that I can change in any way. It is only available to me.
GETS / POSTS work in curl, but I get an error in my angular web app
I read a ton of posts about this, and after nothing seemed to work, I installed the CORS extension to Chrome, added *://*/*, and I have to turn it on anytime I'm trying to access the server. But it works.
Most of the posts say this is because the server does not allow access from outside sources. So I did some more digging and found the W3 CORS enabled site, that specifies a filter must be added.
However, when I get the error, I can open the network panel and see that the response came back exactly as I was expecting, so why did I get an error?
This makes it seem like Chrome is not allowing access.
Why must the server be changed to allow this?
Does this mean anyone with this chrome extension can access my server?
It seems like it should be possible to configure a header in my $http.get that would allow this, but everyone keeps saying its the server...
Cross domain calls are not allowed by default. When the browser makes a call to a website or Web-API sitting on a different domain than the domain opened on the browser, it includes a HTTP header "Origin" in the request. The server looks at this header and if it's white-listed it includes the header Access-Control_Allow_Origin in the response. All this happens in a pre-flight request using HTTP Options method before the actual GET/POST call. So for the CORS to work the server has to allow the client domain, so the browser can make further calls.

Ionic App aborting request with response status -1

I'm using Ionic platform for my mobile application. Using angular
$http for sending requests to server.
Intermittently when Mobile app tries to access server $http goes to it's errorCallback with response status -1 only no other
data.
When I check log on server, not able to see any hit.
I've changed timeout of application to 2 minutes using interceptors.
I have used chrome debugger but it won't show anything apart from
request it forms, shows nothing in response and preview columns.
I got that in Ionic we use pre-flight to check if server is alive
before sending actual request. But it's for CORS; we have enabled
CORS on server and thats why app is working good since last 15 days.
Thought of using network packet tracer tool but if call not logged on
server no use of it. as Status -1 says $http aborted the request.
My Question is why it's aborting when I click once and do send
when I click same button again.
Please me help to figure out an issue.
After lots of debugging and surfing over internet for issue.
I guess that an issue was like mobile app sending pre-flight messages and so $http aborting the request and even some time Server played a culprit here how will tell you;
We have server hosted on AWS in where we had Load balancer in different zone and actual API server is in different zone. After changing them to same zone ask, production people to test now they are not getting this issue.
The another reason was we were using unstable mobile networks to test.
If any one have any thing else on this please let me know.

Why is my content script not adding iframe based sidepanel to some sites especially HTTPS sites? [duplicate]

The users of our website run our Chrome plugin which, amongst other things, performs cross-origin requests via XMLHttpRequest as described on the Chrome extension development pages. This has been running just fine for a few years now. However, ever since our users upgraded to the latest version of Chrome (v38), these requests have failed. Our site runs on HTTPS and some of the URLs loaded via our content script are on HTTP. The message is:
[blocked] The page at 'https://www.ourpage.com/' was loaded over
HTTPS, but ran insecure content from 'http://www.externalpage.com':
this content should also be loaded over HTTPS.
The reported line where the error occurred is in the content script where I'm issuing the HTTP call:
xhr.send(null);
I have no control over the external page and I would rather not remove SSL from our own page. Question: Is this a bug or is there a workaround that I am not aware of?
(Note: The permissions in the manifest were always set to <all_urls> which had worked for a long time. Setting it to http://*/ and https://*/ did not help.)
If possible, use the https version of that external page.
If that is not possible, use the background page to handle the AJAX request (example).

'Access control allow origin' Not working on different system

I am using Django for Rest API and Angularjs for front-end.
I have set the header in Django to give API access to a domain (www.example.com).
The code is working fine, I am able to make ajax calls, from my system (OS - MAC, Browser : Firefox, Chrome, Safari, Android chrome, Native browser). Almost everything.
Now suddenly I am getting this error, on specific OS:
XMLHttpRequest cannot load http://www.apicalls.in/.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://www.example.com' is therefore not allowed access.
I am getting this problem on Windows 10 Chrome browser (Both OS have same chrome version - 46.x.x.x). I am unable to understand this behavior since the API is working fine with all the other devices with same browser. Anyone faced this problem before?
If your server is configured correctly (I mean, it respects the CORS specification), then it may be a cache problem.
If you have retrieved http://www.apicalls.in/ in your browser before your ajax, (That is to say, you have triggered a GET request to http://www.apicalls.in/ with no Origin in your request header. )
then your server would serve the web page with no Access-Control-Allow-Origin header in response. Your next ajax request to the same URL would hit the browser cache and blocked by the browser because of the same origin restriction.
To fix this, you could add a random param to your request url (e.g. http://www.apicalls.in/?_=123) or open up the developer tool of chrome and checked on disable cache. Good luck :)

GET request not firing in IE

This is killing me.
So I have a backbone site where when the user logs in, a GET request is made to the server and an access token is returned. Everything is working in FF, Chrome, IE10.
When I look at code inspector in IE9, the network tab does not list the get request to my API at all (not even as pending or failed). When I console log "error.status or error.statusText", it returns with:
0 Error: Access is denied.
My API has "Access-Control-Allow-Origin: *" enabled. I have also added "jQuery.support.cors = true;" to my initialize function in router.js. Now I am just out of ideas! I would really prefer not to setup a proxy.
if you are using backbone than probably you are using jQuery too, so i think you should check this post : Simple jQuery post not working on Internet Explorer 9 (access denied)

Resources