Wangkanai.Universal
0.16.0
Prefix Reserved
See the version list below for details.
dotnet add package Wangkanai.Universal --version 0.16.0
NuGet\Install-Package Wangkanai.Universal -Version 0.16.0
<PackageReference Include="Wangkanai.Universal" Version="0.16.0" />
paket add Wangkanai.Universal --version 0.16.0
#r "nuget: Wangkanai.Universal, 0.16.0"
// Install Wangkanai.Universal as a Cake Addin #addin nuget:?package=Wangkanai.Universal&version=0.16.0 // Install Wangkanai.Universal as a Cake Tool #tool nuget:?package=Wangkanai.Universal&version=0.16.0
Wangkanai Google Universal Analytics
ASP.NET Core Google Analytics service is lightweight server-side code that generator library that JavaScript client-side on the fly for Google Analytics analytics.js. The goal of the framework is to stay out of the way as much as possible and provide a super interaction with Google all from C#.
This old project my was developed back long time ago in the days of ASP.NET Full Framework around 2013. If you like me to upgrade this project using the design pattern my Detection library.
Please give me appreciation and click stars ⭐:star::star:, when this project reach 100 stars. I will rebuild project for ASP.NET Core 6.0. But you wanna contract me to get start development of the a migration to ASP.NET Core for your production requirement and long term support. Please contact me personally and we can discuss the details.
Installation
Installation of google universal analytics library is now done with a single package reference point.
PM> install-package Wangkanai.Universal
Configuration
public void ConfigureServices(IServiceCollection services)
{
// Add detection services container and device resolver service.
services.AddGoogleAnalytics();
// Add framework services.
services.AddControllersWithViews();
}
AddGoogleAnalytics()
Adds the google universal services to the services container.
The current device on a request is set in the Responsive middleware. The Universal middleware is enabled in
the Configure
method of Startup.cs file.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseGoogleAnalytics();
app.UseRouting();
app.UseEndpoints(endpoints => endpoints.MapDefaultControllerRoute());
}
This project provide the full source code and complied dll library for you to add reference into your visual studio projects. The library include Intellisense to help guide you write server-side code in an effective manner.
public ActionResult Ecommerce()
{
var session = new Wangkanai.Universal.Session();
session.Transaction = new Transaction("1234", "store", 1.0, 1.0);
session.Transaction.Items.Add(new Item("product a", "a001", "xxx", 2.0, 1));
session.Transaction.Items.Add(new Item("product b", "b001", "yyy", 3.0, 2));
ViewBag.AnalyticsSession = session;
return View();
}
Features
Demo
Where it originated from?
This original library that was introduced in CodePlex. The library was for .NET Framework web application to render analytics.js javascript client-side to interact with Google API from .NET language web application within the server-side code environment. Both ASP.NET WebForm and ASP.NET MVC. Its was good, but we would like to see a much more extensible and ambust platform, so we are rewriting the entire framework.
How do i contribute?
Universal Analytics is a powerful and continuous improving platform. We would like to invite developers to help maintain and add features so that this library is keep aligned with most of the popular web analytics out there.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Wangkanai.Hosting (>= 0.6.0)
- Wangkanai.System (>= 1.6.0)
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 | |
---|---|---|---|
0.21.0 | 220 | 6/16/2023 | |
0.20.1 | 172 | 6/7/2023 | |
0.20.0 | 168 | 5/15/2023 | |
0.19.0 | 177 | 5/11/2023 | |
0.18.0 | 232 | 4/3/2023 | |
0.17.3 | 329 | 1/10/2023 | |
0.17.2 | 321 | 1/3/2023 | |
0.17.1 | 308 | 12/31/2022 | |
0.17.0 | 318 | 12/27/2022 | |
0.16.0 | 330 | 12/23/2022 | |
0.15.0 | 348 | 11/30/2022 | |
0.14.0 | 341 | 11/28/2022 | |
0.13.0 | 355 | 11/27/2022 | |
0.12.0 | 337 | 11/26/2022 | |
0.11.0 | 342 | 11/24/2022 | |
0.10.0 | 359 | 11/18/2022 | |
0.9.0 | 352 | 11/15/2022 | |
0.8.0 | 358 | 11/9/2022 | |
0.7.0 | 374 | 11/9/2022 | |
0.5.2 | 447 | 9/27/2022 | |
0.5.1 | 446 | 9/23/2022 | |
0.5.0 | 497 | 9/13/2022 | |
0.4.0 | 438 | 9/13/2022 | |
0.3.300 | 430 | 9/9/2022 | |
0.3.200 | 431 | 8/23/2022 | |
0.3.100 | 434 | 8/21/2022 | |
0.2.500 | 440 | 6/23/2022 | |
0.2.400 | 468 | 3/9/2022 | |
0.2.300 | 480 | 2/22/2022 | |
0.2.201 | 473 | 2/19/2022 | |
0.2.200 | 472 | 2/18/2022 | |
0.2.100 | 458 | 2/18/2022 | |
0.0.100 | 487 | 2/12/2020 | |
0.0.100-alpha | 371 | 2/10/2020 |