Hi there, this is more a question than an actual issue
Depending on the location of some of our company's users,
we encounter tracking issues when some network filtering devices explicitly reject the _pk_ses cookies due to the fact that its value is set to ''
It would appear that value is hard-coded inside piwik.js
Question is :
can we edit piwik.js and replace the '*' character by some string of our choice without impacting Matomo's tracking & reporting routines? (we are running Matomo 3.7.0)
You could overwrite it with
_paq.push(['setSessionCookie'], '1', ...) and it shouldn't cause any issues as far as I can see. Maybe we just need to set it to
1 instead of a
*. @mattab do you maybe know why it is a
* currently in https://github.com/matomo-org/matomo/blob/3.8.0-b5/js/piwik.js#L4259 ?
@tsteur don't think there is a reason for it, sounds good to replace with
Just adding some information regarding the previous comments.
@tsteur workaround suggestion seems to not be a working solution.
Code should be
_paq.push(['setSessionCookie', 'ses', '1']); in order to not have a syntax error. This syntax do force the session cookie value to '1' but this value is overridden after with the '*' default value after the first event detection.
This is due to
setSessionCookie() (l. 4258) being called by
getRequest(request, customData, pluginMethod, currentEcommerceOrderTs) method at line 4506. This call without argument force the cookie value to '*' and this method is called at every event detected.
There is no guarantee to not have a '*' value for
_pk_ses cookie at some point and therefore being blocked by a network filter.
Waiting for 3.9.0 and 3.8.1 releases seems to be necessary in this case.
Thanks for letting us know