VisitsTracker 1.0.0-rc001

This is a prerelease version of VisitsTracker.
dotnet add package VisitsTracker --version 1.0.0-rc001                
NuGet\Install-Package VisitsTracker -Version 1.0.0-rc001                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VisitsTracker" Version="1.0.0-rc001" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VisitsTracker --version 1.0.0-rc001                
#r "nuget: VisitsTracker, 1.0.0-rc001"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install VisitsTracker as a Cake Addin
#addin nuget:?package=VisitsTracker&version=1.0.0-rc001&prerelease

// Install VisitsTracker as a Cake Tool
#tool nuget:?package=VisitsTracker&version=1.0.0-rc001&prerelease                

VisitsTracker

This package was made for Umbraco solutions, and can be used to track visits to your content!

Prerequisites

This project is made with .NET 6, so the minimum requirement is the .NET SDK 6.0.302

Getting started

After installing this package, all you have to do is inject the ITrackingService into each of your razor templates, and call the ReportVisit(int contentId) method where you pass the contents id, like so:

@using VisitsTracker.Services
@inject ITrackingService _trackingService;
@{
    _trackingService.ReportVisit(Model.Id);
}

This does get tedious if you have a lot of templates though! But you are in luck, if all your views has a master template, you can just inject the above in your master template instead! (Most typical master template is the _Layout.cshtml file)

Contributing to VisitsTracker

When you have made some changes you then want to change, open a terminal in the root of this project, and run the following command: dotnet pack --configuration Release /p:Version=1.0.0-rc001 --output .\Release This will generate a nuget package file in the Release directory. In your umbraco project, you can then either add the nuget source manually through your IDE, and then install the package. Or you can run the following command in the root of your umbraco project: dotnet add package VisitsTracker -s {{PATH TO YOUR PACKAGE RELEASE FOLDER HERE}} --prerelease Real example: dotnet add package VisitsTracker -s C:\Users\Zeegan\Documents\GitHub\VisitsTracker\Release --prerelease

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-rc001 115 7/28/2022