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

Cookie _pk_ses value set to * causing some network filter to reject the cookie #13897

Closed
MattMacD78 opened this issue Dec 21, 2018 · 4 comments
Closed
Assignees
Milestone

Comments

@MattMacD78
Copy link

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
Copy link
Member

tsteur commented Dec 21, 2018

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
Copy link
Member

mattab commented Dec 23, 2018

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

@mattab mattab added this to the 3.9.0 milestone Dec 23, 2018
@mattab mattab changed the title impact of editing the _pk_ses cookie contents? Cookie _pk_ses value set to * causing some network filter to reject the cookie Dec 23, 2018
@diosmosis diosmosis self-assigned this Jan 17, 2019
@mattab mattab modified the milestones: 3.9.0, 3.8.1 Jan 22, 2019
@nhumblot
Copy link

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
Copy link
Member

tsteur commented Jan 23, 2019

Thanks for letting us know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants