feat: add google analytics
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Blazor.Analytics;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.ConfigureOptions<FilePostServiceOptionsSetup>();
|
||||
@@ -6,6 +8,9 @@ builder.Services.AddScoped<IPostService, FilePostService>();
|
||||
|
||||
builder.Services.AddRazorComponents();
|
||||
|
||||
var googleTag = builder.Configuration["GoogleAnalyticsTag"];
|
||||
builder.Services.AddGoogleAnalytics(googleTag);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
if (app.Environment.IsProduction())
|
||||
|
||||
Reference in New Issue
Block a user