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

feat: added Matomo event for user clicking on account deletion (issue #6351) #6410

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

RathoreAbhiii
Copy link

What

  • Tracked "Delete account" event using Matomo tracker to track users clicking on account deletion.

Fixes bug(s)

Part of

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.

Project coverage is 5.84%. Comparing base (4d9c7fc) to head (9f09b01).
Report is 782 commits behind head on develop.

Files with missing lines Patch % Lines
...ib/pages/preferences/user_preferences_account.dart 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6410      +/-   ##
==========================================
- Coverage     9.54%   5.84%   -3.71%     
==========================================
  Files          325     490     +165     
  Lines        16411   29252   +12841     
==========================================
+ Hits          1567    1710     +143     
- Misses       14844   27542   +12698     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teolemon teolemon requested a review from a team March 3, 2025 18:35
Copy link
Member

@AshAman999 AshAman999 left a comment

Choose a reason for hiding this comment

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

Left some comments !

// Track Matomo event for clicking on Delete Account
MatomoTracker.instance.trackEvent(
eventInfo: EventInfo(
category: 'User Action',
Copy link
Member

Choose a reason for hiding this comment

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

I think you should go throught the
packages\smooth_app\lib\helpers\analytics_helper.dart file first.

I recommend creating the event in the Enum first then using it here.

Copy link
Author

Choose a reason for hiding this comment

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

Done. Before pushing the commits though, I want to know whether I should revert the changes in the GeneratedPluginRegistrant.swift file or not. Thanks.

Copy link
Member

Choose a reason for hiding this comment

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

Why is this change required btw ?

Copy link
Author

Choose a reason for hiding this comment

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

Flutter's plugin system automatically updated GeneratedPluginRegistrant.swift when the pubsec.yaml file was changed. That is, the 'app_settings' package was added to the pubspec.yaml but I don't remember adding it. Should I revert it or let it be?

Copy link
Collaborator

Choose a reason for hiding this comment

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

We're not a macOS app, so we will include that in a future upgrade.

Copy link
Author

Choose a reason for hiding this comment

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

We're not a macOS app, so we will include that in a future upgrade.

Got it. I'll revert those changes and make the necessary commits.

Copy link
Author

@RathoreAbhiii RathoreAbhiii Mar 4, 2025

Choose a reason for hiding this comment

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

@g123k I just noticed that someone had edited smooth-app/packages/smooth_app/lib/pages/preferences/user_preferences_advanced_settings.dart file where they are using the app_settings package inside the onTap(_) method over here:

 @override
  Widget build(BuildContext context) {
    final AppLocalizations appLocalizations = AppLocalizations.of(context);
    return UserPreferenceListTile(
      onTap: (_) async => AppSettings.openAppSettings(), // comes from the 'app_settings' package
      title: appLocalizations.native_app_settings,
      subTitle: appLocalizations.native_app_description,
      leading: const Icon(CupertinoIcons.settings_solid),
      showDivider: true,
    );
  }

I don't know why these changes were reflected as my commits but I didn't change them. Will need to re-revert them and include app_settings in the pubsec.yaml which will in turn change the GeneratedPluginRegistrant.swift file as well. Else this file will have missing packages.

@github-actions github-actions bot added 📈 Analytics We use Sentry and Matomo, with an opt-in system dependencies labels Mar 4, 2025
@RathoreAbhiii
Copy link
Author

@AshAman999 @g123k Please review the changes and let me know. Thanks!

@RathoreAbhiii
Copy link
Author

I just noticed an earlier PR and it's commits regarding tracking Matomo events and found out that using Matomo.instance.trackEvent() for every event is not the best way to go about it. AnalyticsHelper.trackEvent() would be a much better approach to it. Can someone guide me whether this is the right approach for it? Thanks. @AshAman999

builder: (BuildContext context) => AccountDeletionWebview(),
),
),
() async {
Copy link
Member

Choose a reason for hiding this comment

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

Check line no 254 from the same file, that how we have done that

AnalyticsHelper.trackEvent(AnalyticsEvent.logoutAction);

I believe we can do something similar.

Copy link
Author

Choose a reason for hiding this comment

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

yep, did it the same way now. Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

if this change is not needed, please revert

Copy link
Member

Choose a reason for hiding this comment

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

same here:
if this change is not needed, please revert

Copy link
Author

Choose a reason for hiding this comment

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

I'm waiting for Edouard's response whether to include the 'app_settings' package in the pubspec.yaml or not. Then I'll make the final commits all-together.

Copy link
Member

@AshAman999 AshAman999 left a comment

Choose a reason for hiding this comment

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

Please address the comments left

@RathoreAbhiii RathoreAbhiii requested a review from g123k March 6, 2025 05:04
@RathoreAbhiii RathoreAbhiii requested a review from AshAman999 March 6, 2025 05:57
@AshAman999
Copy link
Member

Hey @RathoreAbhiii
Looks good, just revert the changes in pubspec.yaml and lock file, and is good to go from my side.

@RathoreAbhiii
Copy link
Author

Hey @RathoreAbhiii Looks good, just revert the changes in pubspec.yaml and lock file, and is good to go from my side.

Have been reverted, 'app_settings" and it's related config. is no longer there in the pubspec.yaml, pubspec.lock and GeneratedPluginRegistrant.swift files. (As seen in the commit saving changes before rebase) @AshAman999

@AshAman999
Copy link
Member

Hey @RathoreAbhiii
I still see the changes in the pubscpec.yaml and lock files, also let's just rebase as well.

My thinking was not to include the changes which are not part of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📈 Analytics We use Sentry and Matomo, with an opt-in system dependencies 🖥️ MacOS
Projects
Development

Successfully merging this pull request may close these issues.

4 participants