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] [#129] #130

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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