diff --git a/README.md b/README.md index 134aa0a..dca71e8 100644 --- a/README.md +++ b/README.md @@ -409,6 +409,13 @@ await MatomoTracker.instance.initialize( Null + + + jainhitesh9998 +
+ Hitesh C +
+ lukaslihotzki diff --git a/example/lib/main.dart b/example/lib/main.dart index 9d7c395..1063d44 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -7,7 +7,7 @@ import 'package:url_launcher/url_launcher.dart'; // See the docker folder for instructions on how to get a // test Matomo instance running const _matomoEndpoint = 'http://localhost:8765/matomo.php'; -const _sideId = 1; +const _sideId = "1"; const _testUserId = 'Nelson Pandela'; // Use this as dispatchSettings in MatomoTracker.instance.initialize() diff --git a/lib/src/local_storage/local_storage.dart b/lib/src/local_storage/local_storage.dart index 2844faf..4197ada 100644 --- a/lib/src/local_storage/local_storage.dart +++ b/lib/src/local_storage/local_storage.dart @@ -1,4 +1,4 @@ -abstract class LocalStorage { +abstract interface class LocalStorage { Future getVisitorId(); Future setVisitorId(String visitorId); Future getFirstVisit(); diff --git a/lib/src/matomo.dart b/lib/src/matomo.dart index f9bb212..6c05fab 100644 --- a/lib/src/matomo.dart +++ b/lib/src/matomo.dart @@ -55,7 +55,7 @@ class MatomoTracker { /// The ID of the website we're tracking a visit/action for. /// /// Corresponds with `idsite`. - late final int siteId; + late final String siteId; /// The url of the Matomo endpoint. /// @@ -205,7 +205,7 @@ class MatomoTracker { /// It is recommended to leave [userAgent] to `null` so it will be detected /// automatically. Future initialize({ - required int siteId, + required String siteId, required String url, bool newVisit = true, String? visitorId, diff --git a/lib/src/matomo_action.dart b/lib/src/matomo_action.dart index f92afa0..3c34639 100644 --- a/lib/src/matomo_action.dart +++ b/lib/src/matomo_action.dart @@ -206,7 +206,7 @@ class MatomoAction { return { // Required parameters - 'idsite': tracker.siteId.toString(), + 'idsite': tracker.siteId, 'rec': '1', if (nV != null && nV) 'new_visit': '1', diff --git a/pubspec.yaml b/pubspec.yaml index b156a1e..b25ee93 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,16 +16,16 @@ environment: dependencies: clock: ^1.1.1 collection: ^1.17.2 - device_info_plus: ">=9.0.3 <11.0.0" + device_info_plus: ^9.1.0 flutter: sdk: flutter http: ^1.1.0 - package_info_plus: ">=4.1.0 <6.0.0" + package_info_plus: ">=4.2.0 <6.0.0" shared_preferences: ^2.2.2 - uuid: ^3.0.7 + uuid: ^4.1.0 dev_dependencies: - custom_lint: ^0.5.3 + custom_lint: ^0.5.4 fd_lints: ^2.2.0 flutter_test: sdk: flutter diff --git a/test/ressources/mock/data.dart b/test/ressources/mock/data.dart index c0387f7..4760d6d 100644 --- a/test/ressources/mock/data.dart +++ b/test/ressources/mock/data.dart @@ -119,7 +119,7 @@ const matomoDispatcherToken = 'token'; // MatomoTracker const matomoTrackerContentBase = 'contentBase'; -const matomoTrackerSiteId = 1; +const matomoTrackerSiteId = "1"; const matomoTrackerScreenResolution = Size(200, 200); const matomoTrackerUrl = 'https://example.com'; const matomoTrackerContentBaseUrl = 'https://example.com';