Pericia.AspNetCore.Matomo
1.0.0
dotnet add package Pericia.AspNetCore.Matomo --version 1.0.0
NuGet\Install-Package Pericia.AspNetCore.Matomo -Version 1.0.0
<PackageReference Include="Pericia.AspNetCore.Matomo" Version="1.0.0" />
paket add Pericia.AspNetCore.Matomo --version 1.0.0
#r "nuget: Pericia.AspNetCore.Matomo, 1.0.0"
// Install Pericia.AspNetCore.Matomo as a Cake Addin #addin nuget:?package=Pericia.AspNetCore.Matomo&version=1.0.0 // Install Pericia.AspNetCore.Matomo as a Cake Tool #tool nuget:?package=Pericia.AspNetCore.Matomo&version=1.0.0
Pericia.AspNetCore.Matomo
ASP.NET Core Tag helper for Matomo analytics service
Install
The library Pericia.AspNetCore.Matomo
is available on Nuget :
You can install it with the following command line in your Package Manager Console :
Install-Package Pericia.AspNetCore.Matomo
Or with dotnet core :
dotnet add package Pericia.AspNetCore.Matomo
GDPR compliance
This library is built to help you to be compliant with the European General Data Protection Regulation (GDPR), and is based on the CNIL recommendations
In order to be fully compliant, you need to configure Matomo to anonymize data, and mask at leat 2 bytes of the visitors' IP. You also have to let the user opt-out, by addind the opt-out iframe in your privacy page (see below).
If you don't do this, you must ask for user consent before to add the tracking tag.
How to use
Configuration
Add a "Matomo" section in your settings file :
"Matomo": {
"TrackerUrl": "https://stats.example.com",
"SiteId": "1",
"TrackerOptions": {
"DisableCookieTimeoutExtension": true,
"NoScriptTracking": true,
"PrependDomainToTitle": false,
"ClientDoNotTrackDetection": true
},
"OptoutOptions": {
"Language": "fr"
}
}
Required parameters :
TrackerUrl
: the url of your matomo siteSiteId
: the id of the website in matomo
Optional parameters :
TrackerOptions:DisableCookieTimeoutExtension
: limit the cookie duration to 13 months - required for GDPR compliance (defaults true)TrackerOptions:NoScriptTracking
: tracks users with JavaScript disabled (defaults true)TrackerOptions:PrependDomainToTitle
: prepend the site domain to the page title when tracking (defaults false)TrackerOptions:ClientDoNotTrackDetection
: enable client side DoNotTrack detection (defaults true)OptoutOptions:Language
: the 2-letter code for the language used in the opt-out screen (defaultsen
)
Tag helpers
Reference the tag helpers :
@addTagHelper *, Pericia.AspNetCore.Matomo
Add the tracking script in your page before </head>
<matomo-tracking></matomo-tracking>
Add the opt-out iframe in your Privacy page
<matomo-opt-out></matomo-opt-out>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 3.1.22)
- Microsoft.Extensions.Configuration.Binder (>= 3.1.22)
-
net5.0
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 5.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 5.0.0)
-
net6.0
- Microsoft.AspNetCore.Razor (>= 2.2.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.