Improved telemetry by adding anonymous usage reports - #4687
Draft
gabriel-bolbotina wants to merge 15 commits into
Draft
Improved telemetry by adding anonymous usage reports#4687gabriel-bolbotina wants to merge 15 commits into
gabriel-bolbotina wants to merge 15 commits into
Conversation
Add usageReportEnabled property to AppSettings with QSettings persistence under usage_report/enabled. On opt-out, all accumulated usage_report/* data is cleared but the enabled flag is preserved. Wire the toggle to the settings page UI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add USAGE_REPORT_KEY CMake variable and mmconfig.h.in define. Add trySubmitUsageSnapshot() function in main.cpp that: - checks if a weekly snapshot is due - collects static data (device, app, server info) - merges accumulated dynamic data from QSettings - sends a single HTTP POST to the EU endpoint - resets dynamic data on success, silently ignores errors Called once after app initialization. No signal connections yet — dynamic data accumulation will be wired in the next commit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wire feature class signals in main.cpp to lambdas that write usage data to QSettings under usage_report/data/*. Signals connected: - FilterController::hasFiltersActivatedChanged → filtering - AutosyncController::projectSyncRequested → autosync - ProjectWizard::projectCreated → created_project - AndroidUtils/IosUtils::photoCaptured/photoFromGallery → image counts - MerginUserInfo::activeWorkspaceChanged → workspace_switches - PositionKit::positionProviderChanged → external GPS tracking - ActiveProject::projectRoleChanged → highest_role - ActiveProject::loadingStarted/projectReloaded → project load time New signals added: - MapSketchingController::sketched() for map sketching detection - AndroidUtils/IosUtils::photoCaptured()/photoFromGallery() to distinguish camera capture from gallery attachment Connectivity ping timer: HEAD request every 5 minutes, counts success/failure in QSettings. Note: map measuring, map sketching, photo sketching, reuse last value, and bulk editing are QML-instantiated objects — these will be tracked via AppSettings helpers in the next commit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add trackUsageFeature() and incrementUsageCounter() to AppSettings for features whose C++ controllers are QML-instantiated per-use objects with no persistent instance to connect to in main.cpp. Tracked from QML: - map_measuring (MMMapController) - map_sketching (MMMapController) - photo_sketching (MMFormPhotoSketchingPageDialog) - reuse_last_value (MMFormStackController, on form save) - bulk_editing (main.qml, on multi-edit with >1 feature) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added a temporary endpoint Remaned distinct_id with device_id
Added layer and feature search analytics Updated filtering analytics
Coverage Report for CI Build 33194016277Coverage decreased (-1.0%) to 58.593%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions737 previously-covered lines in 11 files lost coverage.
Coverage Stats
💛 - Coveralls |
📦 Build Artifacts Ready
|
📦 Build Artifacts Ready
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enhancement has been done to better understand our app and which features are valuable to our users, as well as continuing on improving the experience overall. It also helps prioritise development and simplifies UX/ UI design. It is an OPT-OUT enhancement that stores no personal data.
Summary of changes:
trySubmitUsageSnapshot+ signal connections for each feature that is analysedResolves: https://github.com/MerginMaps/product/issues/127