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

handle new cookie values #77

Closed
wants to merge 3 commits into from
Closed

handle new cookie values #77

wants to merge 3 commits into from

Conversation

diosmosis
Copy link
Member

Fix matomo-org/matomo#16397

Not currently running on travis but could probably be easy to add.

@diosmosis diosmosis mentioned this pull request Sep 7, 2020
$this->cookieVisitorId = $parts[0];
$this->createTs = $parts[1];
$this->visitCount = (int)$parts[2];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diosmosis we will still also need to support the old cookies just in case. That's because say

  • You update Matomo to Matomo 4
  • You also update the PHP tracker
  • Then a visitor visits your website who didn't visit your website in a while. Then the old cookie structure will be sent. Possible that not even the tracking code is embedded on that same page.

We could check maybe how many parts are included and then use old or new strategy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tsteur The only parts of the old cookie that are used in Matomo 4 are the first two elements. So if a cookie w/ more items comes in, it should still work. Unless I'm missing something? (There's a test for this, btw.)

@tsteur
Copy link
Member

tsteur commented Sep 7, 2020

Makes sense @diosmosis

I think the PR should be made against 4.x-dev though if I understand things correctly in #72 (comment)

@tsteur
Copy link
Member

tsteur commented Sep 7, 2020

Feel free to merge but needs to be merged for the different branch I think...

@diosmosis diosmosis changed the base branch from master to 4.x-dev September 7, 2020 04:29
@diosmosis
Copy link
Member Author

👍

@diosmosis diosmosis changed the base branch from 4.x-dev to master September 7, 2020 04:42
@diosmosis
Copy link
Member Author

closing in favor of #79

@diosmosis diosmosis closed this Sep 7, 2020
@diosmosis diosmosis deleted the new-cookie branch September 7, 2020 06:50
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

Successfully merging this pull request may close these issues.

Fix undefined offset in Matomo PHP Tracker
2 participants