Skip to content

Add custom visitor cookie timeout setting #563

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

Merged

Conversation

tomper00
Copy link
Contributor

@tomper00 tomper00 commented Nov 1, 2022

Add possibility to set custom a custom cookie timeout in the Matomo config variable as described in #562

Description:

This will add a new setting in the Matomo Config variable where you can manually set the timeout in seconds for the pk_id cookie.

Review

Add possibility to set custom a custom cookie timeout in the Matomo config variable as described in matomo-org#562
Copy link
Contributor

@snake14 snake14 left a comment

Choose a reason for hiding this comment

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

Hi @tomper00 . Thank you for taking the time to create this PR. I think it looks pretty good, but there are a few changes I'd like to request.

  1. Could you please update the tests that are broken by your changes? If you need help with the screenshots or any other parts, just let me know.
  2. Could you please create a migration to add your new fields to existing tags?
  3. Could you please add some validation to the customCookieTimeOut field. The typing handles some validation, but I think a minimum value would be a good idea to at least prevent 0 and negative values.

@snake14
Copy link
Contributor

snake14 commented Nov 1, 2022

@mattab This customer provided PR is looking really good and I'd like to merge it after a few additions/adjustments. Do the new fields look alright to you and do the labels/wording look alright?

Updated failed tests
Added validation to customCookieTimeOut
Added tag migration script (hopefully got this right=
Add num range validator
Copy link
Contributor

@snake14 snake14 left a comment

Choose a reason for hiding this comment

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

@tomper00 Thank you again for all your effort on this PR. I made a few comments about minor changes. After those are made, I think that this PR will be ready as long as our product team is alright with the label text.

Based on great feedback from snake14
Make it easier to configure by using full days instead of seconds
393 days instead of 33955200 seconds
@tomper00
Copy link
Contributor Author

tomper00 commented Nov 4, 2022

@snake14 Great feedback, thanks for the help!
I added the new tests and also changed the variable to use days instead of seconds, since I think that is a much better from a usability perspective.
Looks like the tests are ok now.

@tomper00 tomper00 requested a review from snake14 November 4, 2022 13:29
Copy link
Contributor

@snake14 snake14 left a comment

Choose a reason for hiding this comment

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

@tomper00 Things are looking good. I only had one more requested change after your change from seconds to days. My only other thought is that some customers might want more granularity than a day, but what you've got should work.

Fix default value in update script to match full days!
@tomper00
Copy link
Contributor Author

tomper00 commented Nov 7, 2022

Good point with the granularity, but it's probably good enough for now. I updated the update script default value now as well, thanks again for the feedback!

Copy link
Contributor

@snake14 snake14 left a comment

Choose a reason for hiding this comment

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

Sorry. One more change and I think it will be ready to merge. I tested it with my suggested changes and it looks good. Please see my other comment.

Changes to doUpdate after comment from @snake14
Another fix, not reading comments good enough..
Copy link
Contributor

@snake14 snake14 left a comment

Choose a reason for hiding this comment

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

Thank you again for all of your effort on this PR. My functional testing looked good and I think these changes look ready to merge. Does everything look alright to you @mattab ? Any label/wording changes?

Copy link
Contributor

@AltamashShaikh AltamashShaikh left a comment

Choose a reason for hiding this comment

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

@tomper00 left few textual changes, rest looks good and thanks for the PR 👍

Submitting suggestions for better translations

Co-authored-by: Altamash Shaikh <altu9594@gmail.com>
submitting translation improvements.

Co-authored-by: Altamash Shaikh <altu9594@gmail.com>
@tomper00
Copy link
Contributor Author

tomper00 commented Nov 8, 2022

@AltamashShaikh thanks for helping out, your changes are submitted now.

Fix tests to match new translations
Force rebuild since tests failed for suspicious reasons
@AltamashShaikh AltamashShaikh merged commit 6a4a64c into matomo-org:4.x-dev Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants