diff --git a/packages/smooth_app/lib/helpers/analytics_helper.dart b/packages/smooth_app/lib/helpers/analytics_helper.dart index 246d854fcd0..afc30021c68 100644 --- a/packages/smooth_app/lib/helpers/analytics_helper.dart +++ b/packages/smooth_app/lib/helpers/analytics_helper.dart @@ -63,10 +63,7 @@ class AnalyticsHelper { ); } - static Future initMatomo( - final BuildContext context, - final LocalDatabase _localDatabase, - ) async { + static void initMatomo(final BuildContext context) { MatomoForever.init( 'https://analytics.openfoodfacts.org/matomo.php', 2, @@ -90,7 +87,9 @@ class AnalyticsHelper { // The current count of visits for this visitor data.addIfVAndNew( - '_idvc', trackingDatabaseHelper.getAppVisits().toString()); + '_idvc', + trackingDatabaseHelper.getAppVisits().toString(), + ); // The UNIX timestamp of this visitor's previous visit data.addIfVAndNew( '_viewts', diff --git a/packages/smooth_app/lib/main.dart b/packages/smooth_app/lib/main.dart index b80c46a0484..6a99d43dca5 100644 --- a/packages/smooth_app/lib/main.dart +++ b/packages/smooth_app/lib/main.dart @@ -88,7 +88,7 @@ class _SmoothAppState extends State { UserManagementHelper.mountCredentials(); await ProductQuery.setUuid(_localDatabase); - await AnalyticsHelper.initMatomo(context, _localDatabase); + AnalyticsHelper.initMatomo(context); } @override