matomo-org / matomo-org/plugin-GoogleAnalyticsImporter
Keep track of all reimported date ranges in case reimported ranges fall outside initial range
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 29
- Forks
- 16
- Avg merge
- 15h 12m
- Merged PRs (30d)
- 14
Description
If a user imports a range, then reimports dates outside of that range, there is a danger they may invalidate/re-archive those dates and lose GA data permanently.
The workflow for this bug would be:
- User imports, eg, 2020-07-01,2020-08-01
- User re-imports 2020-06-03,2020-06-04
- User later invalidates 2020-06-03 and re-archives
- This results in no data displaying for that day
This is due to GoogleAnalyticsImporter::isRequestAuthorizedToArchive() thinking, since the date is not within the main import date range, we can safely re-archive it.
To prevent we need to keep track of every re-imported date range as well the main one.
Note: this is an edge case.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading GoogleAnalyticsImporter::isRequestAuthorizedToArchive() and trace how the main import date range and reimported ranges are represented. Reproduce the workflow with an initial range followed by dates outside it, then verify that invalidating and re-archiving any date from a reimported range cannot incorrectly remove its Google Analytics data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100