Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with setRequestMethod POST (due to mod_security) #4095

Closed
anonymous-matomo-user opened this issue Aug 20, 2013 · 2 comments
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@anonymous-matomo-user
Copy link

Due to mod_security we have added the _paq.push("POST"); to the tracking code. Most of the time this is working fine, but still with some visits the GET method is used, and therefore no information stored in the piwik database.

Normally the apache logfile shows lines like "POST /piwik/piwik.php HTTP/1.1" 200 404 "http://www.domain.nl". Some lines from the apache logfile: "GET /piwik/piwik.php?action_name=pagename..." even on the same html page!

I am not able to reproduce only wittness this from happening. Thanks for any help possible! Running Piwik 1.12 on Apache, systemcheck reports "There are no problems with your Piwik setup", the tracking code:

<!-- Piwik -->
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(["setRequestMethod", "POST"]);
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);

  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://www.domain.nl/piwik/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "2"]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>
<!-- Piwik Image Tracker -->
<noscript><img src="http://www.domain.nl/piwik/piwik.php?idsite=2" style="border:0" alt="" /></noscript>
<!-- End Piwik -->

Keywords: setRequestMethod. POST

@mattab
Copy link
Member

mattab commented Sep 6, 2013

Can you please post this on forum.piwik.org, more people will see and please indicate how to reproduce, if you manage to reproduce it?

@mattab
Copy link
Member

mattab commented Sep 16, 2013

Moving 1.x closed tickets to 2.0

@anonymous-matomo-user anonymous-matomo-user added this to the 2.0 - Piwik 2.0 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants