@MattMacD78 opened this Issue on December 21st 2018

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)

Thanks

-M-

@tsteur commented on December 21st 2018 Member

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 ?

@mattab commented on December 23rd 2018 Member

@tsteur don't think there is a reason for it, sounds good to replace with 1 :ok:

@nhumblot commented on January 23rd 2019

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.

@tsteur commented on January 23rd 2019 Member

Thanks for letting us know

This Issue was closed on January 21st 2019
Powered by GitHub Issue Mirror