Skip to content

Improved telemetry by adding anonymous usage reports - #4687

Draft
gabriel-bolbotina wants to merge 20 commits into
masterfrom
prototype/telemetry
Draft

gabriel-bolbotina wants to merge 20 commits into
masterfrom
prototype/telemetry

Conversation

@gabriel-bolbotina

@gabriel-bolbotina gabriel-bolbotina commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • if enabled, the app now sends a weekly anonymous usage snapshot to our telemetry endpoint
  • all analytics logic lives in main.cpp as a static function trySubmitUsageSnapshot + signal connections for each feature that is analysed
  • Added OPT-OUT button in the app settings, which removes all the analysed data
  • on app install each devices receives a telemetry id, that is not linked to device UUID or user account
  • no username, no file paths nor other personal information are being stored

Resolves: https://github.com/MerginMaps/product/issues/127

@gabriel-bolbotina gabriel-bolbotina changed the title Add anonymous weekly usage telemetry Improved telemetry by adding anonymous usage reports Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 36748810431

Coverage decreased (-0.7%) to 58.844%

Details

  • Coverage decreased (-0.7%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 273 coverage regressions across 5 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

273 previously-covered lines in 5 files lost coverage.

File Lines Losing Coverage Coverage
mm/app/main.cpp 137 37.36%
mm/app/appsettings.cpp 88 59.92%
mm/app/mapsketchingcontroller.cpp 31 0.0%
mm/app/ios/iosutils.cpp 16 15.15%
mm/app/layerfeaturesmodel.cpp 1 81.77%

Coverage Stats

Coverage Status
Relevant Lines: 16000
Covered Lines: 9415
Line Coverage: 58.84%
Coverage Strength: 92.62 hits per line

💛 - Coveralls

@gabriel-bolbotina gabriel-bolbotina self-assigned this Aug 28, 2026
@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 72451 dmg Expires: 26/11/2026 #7245
linux Build 📬 Mergin Maps 72711 x86_64 Expires: 26/11/2026 #7271
win64 Build 📬 Mergin Maps 64471 win64 Expires: 26/11/2026 #6447
Android Build 📬 Mergin Maps 855511 APK [armeabi-v7a] Expires: 26/11/2026 #8555
📬 Mergin Maps 855511 APK [armeabi-v7a] Google Play Store #8555
Android Build 📬 Mergin Maps 855551 APK [arm64-v8a] Expires: 26/11/2026 #8555
📬 Mergin Maps 855551 APK [arm64-v8a] Google Play Store #8555
iOS Build 📬 Build number: 26.08.949711 #9497

@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 72471 dmg Expires: 26/11/2026 #7247
linux Build 📬 Mergin Maps 72731 x86_64 Expires: 26/11/2026 #7273
win64 Build 📬 Mergin Maps 64491 win64 Expires: 26/11/2026 #6449
Android Build 📬 Mergin Maps 855751 APK [arm64-v8a] Expires: 26/11/2026 #8557
📬 Mergin Maps 855751 APK [arm64-v8a] Google Play Store #8557
Android Build 📬 Mergin Maps 855711 APK [armeabi-v7a] Expires: 26/11/2026 #8557
📬 Mergin Maps 855711 APK [armeabi-v7a] Google Play Store #8557
iOS Build 📬 Build number: 26.08.949911 #9499

Comment thread app/main.cpp Outdated
gabriel-bolbotina and others added 15 commits September 23, 2026 16:00
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
@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 73251 dmg Expires: 22/12/2026 #7325
linux Build 📬 Mergin Maps 73511 x86_64 Expires: 22/12/2026 #7351
win64 Build 📬 Mergin Maps 65271 win64 Expires: 22/12/2026 #6527
Android Build 📬 Mergin Maps 863751 APK [arm64-v8a] Expires: 22/12/2026 #8637
📬 QR code Google Play Store #8637
Android Build 📬 Mergin Maps 863711 APK [armeabi-v7a] Expires: 22/12/2026 #8637
📬 QR code Google Play Store #8637
iOS Build 📬 Build number: 26.09.957711 #9577

Moved the logic out of main
Small changes in the usage reporter controller
@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 73371 dmg Expires: 24/12/2026 #7337
linux Build 📬 Mergin Maps 73631 x86_64 Expires: 24/12/2026 #7363
win64 Build 📬 Mergin Maps 65391 win64 Expires: 24/12/2026 #6539
Android Build 📬 Mergin Maps 864911 APK [armeabi-v7a] Expires: 24/12/2026 #8649
📬 QR code Google Play Store #8649
Android Build 📬 Mergin Maps 864951 APK [arm64-v8a] Expires: 24/12/2026 #8649
📬 QR code Google Play Store #8649
iOS Build 📬 Build number: 26.09.958911 #9589

@github-actions

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build 📬 Mergin Maps 73581 dmg Expires: 29/12/2026 #7358
linux Build 📬 Mergin Maps 73841 x86_64 Expires: 29/12/2026 #7384
win64 Build 📬 Mergin Maps 65601 win64 Expires: 29/12/2026 #6560
Android Build 📬 Mergin Maps 867051 APK [arm64-v8a] Expires: 29/12/2026 #8670
📬 QR code Google Play Store #8670
Android Build 📬 Mergin Maps 867011 APK [armeabi-v7a] Expires: 29/12/2026 #8670
📬 QR code Google Play Store #8670
iOS Build 📬 Build number: 26.09.961011 #9610

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

📦 Build Artifacts Ready

OS Status Build Info Workflow run
macOS Build ❌ Build failed or not found. #7383
linux Build ❌ Build failed or not found. #7409
win64 Build 📬 Mergin Maps 65851 win64 Expires: 03/01/2027 #6585
Android Build 📬 Mergin Maps 869511 APK [armeabi-v7a] Expires: 03/01/2027 #8695
📬 QR code Google Play Store #8695
Android Build 📬 Mergin Maps 869551 APK [arm64-v8a] Expires: 03/01/2027 #8695
📬 QR code Google Play Store #8695
iOS Build 📬 Build number: 26.10.963511 #9635

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.

2 participants