Piwik not tracking behind NetScaler


#1

Hi,
We have our Piwik configured behind NetScaler and could not get it tracking properly. Could somebody list all cookies and request headers that are required to make all things work together? Or probably we missed something else? Thanks a lot.


Piwik 3.x not tracking behind NetScaler
(Matthieu Aubry) #2

Hi there, I’m not aware of a problem with Piwik on Netscaler, so maybe you are the first one to try it, or to experience it. What are the issues or error messages?


#3

Hi there, thanks for your reply,
There are no error messages - tracking code works fine. I added some console logging - it appears. But Piwik keep silence. I suspect that NS filter out some required info. E.g. we had to modify PiwikTracker.php - just 1 line:
instead
$this->ip = !empty($_SERVER[‘REMOTE_ADDR’]) ? $_SERVER[‘REMOTE_ADDR’] : false;
we use
$this->ip = !empty($_SERVER[‘HTTP_NS_CLIENT_IP’]) ? $_SERVER[‘HTTP_NS_CLIENT_IP’] : false;
So - I wonder if it is possible to get the certain list of request headers and cookies (other stuff?) that is required to make Piwik work. Because some of them could be filtered out or transformed by NS…


(Matthieu Aubry) #4

Ok thanks for report. This sounds like a “missing feature” in piwik. We could add support for Netscaler. Please create new ticket in our issue tracker: http://dev.piwik.org/

With as much info as you can. If you are developer you may also submit pull request, referencing this ticket you create. Ok, I hope we can add support for netscaler!


#5

Ok matt, thanks…
While we investigating it by ourselves could you meanwhile provide what is really required by Piwik:

  1. List of cookies
  2. List of request headers
    I hope this could simplify our attempts)
    Thank again!

#6

Sorry guys but we found out the reason and fixed - it was a problem in db table - one column just disappeared and data could not be stored.
Although NetScaler do have HTTP_NS_CLIENT_IP instead REMOTE_ADDR - you could apply some fixes for it.
Thanks for your help.


(Matthieu Aubry) #7

Cookies created by piwik: What are the cookies created by Piwik JavaScript Tracking client? - Analytics Platform - Matomo