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

Improvements to make MTM and _paq work better together #723

Merged
merged 11 commits into from
Mar 18, 2024

Conversation

snake14
Copy link
Contributor

@snake14 snake14 commented Nov 17, 2023

Description:

We're trying to make the MTM tracking code changes from a few months ago work. This re-applies them, making some improvements and adjusting for recent changes. Re-applying PRs 594 and 599.

Review

@snake14 snake14 marked this pull request as draft November 21, 2023 20:07
@snake14 snake14 marked this pull request as ready for review December 5, 2023 04:55
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.

@snake14 I have tested this changes and looks good 🎉

I just noticed 1 thing is that the order of goals was not consistent
Screenshot from 2023-12-06 08-25-43

@snake14
Copy link
Contributor Author

snake14 commented Dec 6, 2023

@snake14 I have tested this changes and looks good 🎉

I just noticed 1 thing is that the order of goals was not consistent

Thank you @AltamashShaikh I think that we're probably alright. This was the case even when I tested with the plain JS tracker by itself. I loaded the page multiple times and the goal conversion order changed each time.

@AltamashShaikh AltamashShaikh requested a review from tsteur December 6, 2023 04:17
@AltamashShaikh
Copy link
Contributor

@tsteur Can you please do an additional review as it created data loss issues last time when we implemented this

@snake14
Copy link
Contributor Author

snake14 commented Dec 20, 2023

@tsteur Would you be able to review this? If not, we can merge it after the holidays and have QA test it.

@tsteur
Copy link
Member

tsteur commented Dec 20, 2023

@AltamashShaikh @snake14 Is there a way to see the diff in comparison to the previous solution? And do we have somewhere the information which use case it broke last time? It'll be hard for me to test all the different possible scenarios as it would take quite a long time. I wonder if it otherwise makes more sense to get help from support or so.

@snake14
Copy link
Contributor Author

snake14 commented Dec 20, 2023

@tsteur I don't think that there's a clean diff, but here's the PR that reverted the original changes. A diff wouldn't be terribly helpful as there have been a fair number of new configs added to plugins/TagManager/Template/Tag/MatomoTag.web.js since the original ticket. The main issue that I found and fixed was only visible when there were a good number of _paq.push calls for configs mixed in with other tracking requests so that at least one tracking request was dropped. It stemmed from me trying to remove the configs from the array and then processing the remaining requests. I changed it to leave the configs in the array, but simply keep track of their indexes and so that we could skip them while processing the tracking requests. I created a few example HTML files as part of this PR to help show some ways to test and confirm the issue has been resolved.
We were planning on doing QA/support testing after your review, but we can move forward to that if you prefer.

@tsteur
Copy link
Member

tsteur commented Dec 20, 2023

@snake14 it be great if others tested first and if needed I could check last 👍

@snake14
Copy link
Contributor Author

snake14 commented Dec 21, 2023

@achakko Do you have an environment where you can test this without me merging it into 5.x-dev?

@snake14 snake14 merged commit 1eed6a4 into 5.x-dev Mar 18, 2024
4 checks passed
@snake14 snake14 deleted the pg-2764-retry-mtm-tracking-improvement branch March 18, 2024 21:32
@snake14
Copy link
Contributor Author

snake14 commented Mar 18, 2024

@matomo-org/core-team I received the OK from Product to merge this PR. I merged in the most recent changes from 5.x-dev and everything looks good. Can we please tag this change for the Matomo 5.1.0 release?

snake14 added a commit that referenced this pull request May 9, 2024
…cking-improvement"

This reverts commit 1eed6a4, reversing
changes made to 5cb1114.
snake14 added a commit that referenced this pull request May 15, 2024
Revert "Merge pull request #723 from matomo-org/pg-2764-retry-mtm-tracking-improvement"
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.

4 participants