Piwik not tracking behind NetScaler

Hi,
We have our Piwik configured behind NetScaler(NS) 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? So to say - absolutely the same configuration(e.g. product version, php version etc) but without NS works fine in parallel. Thanks a lot.

See 301 Moved Permanently