Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TesteurManiak committed Jan 4, 2024
2 parents adb379c + 9e91e75 commit 94262ae
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,13 @@ await MatomoTracker.instance.initialize(
<sub><b>Null</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/jainhitesh9998">
<img src="https://avatars.githubusercontent.com/u/16622965?v=4" width="100;" alt="jainhitesh9998"/>
<br />
<sub><b>Hitesh C</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/lukaslihotzki">
<img src="https://avatars.githubusercontent.com/u/10326063?v=4" width="100;" alt="lukaslihotzki"/>
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion lib/src/local_storage/local_storage.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
abstract class LocalStorage {
abstract interface class LocalStorage {
Future<String?> getVisitorId();
Future<void> setVisitorId(String visitorId);
Future<DateTime?> getFirstVisit();
Expand Down
4 changes: 2 additions & 2 deletions lib/src/matomo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -205,7 +205,7 @@ class MatomoTracker {
/// It is recommended to leave [userAgent] to `null` so it will be detected
/// automatically.
Future<void> initialize({
required int siteId,
required String siteId,
required String url,
bool newVisit = true,
String? visitorId,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/matomo_action.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/ressources/mock/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 94262ae

Please sign in to comment.