Skip to content

Commit

Permalink
Merge pull request #130 from jainhitesh9998/main
Browse files Browse the repository at this point in the history
[FEAT] [#129]
  • Loading branch information
TesteurManiak authored Dec 29, 2023
2 parents eda39c7 + 2156655 commit e797d11
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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
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
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 e797d11

Please sign in to comment.