Skip to content

Commit

Permalink
[Add] google analytics tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
sam.gerene committed Dec 5, 2021
1 parent f115f24 commit 3f1c2c0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions reqifviewer/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
</LayoutView>
</NotFound>
</Router>
<NavigationTracker />
6 changes: 5 additions & 1 deletion reqifviewer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ namespace reqifviewer
{
using System.Threading.Tasks;

using Blazor.Analytics;

using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;

Expand Down Expand Up @@ -52,7 +54,9 @@ public static async Task Main(string[] args)
builder.Services.AddScoped<NotificationService>();
builder.Services.AddScoped<TooltipService>();
builder.Services.AddScoped<ContextMenuService>();


builder.Services.AddGoogleAnalytics("295704041");

builder.Services.AddSingleton<IReqIFLoaderService, ReqIFLoaderService>();

await builder.Build().RunAsync();
Expand Down
4 changes: 3 additions & 1 deletion reqifviewer/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@
@using reqifviewer.Pages
@using Radzen
@using Radzen.Blazor
@using ReqifViewer.Infrastructure
@using ReqifViewer.Infrastructure
@using Blazor.Analytics
@using Blazor.Analytics.Components
1 change: 1 addition & 0 deletions reqifviewer/reqifviewer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Blazor-Analytics" Version="3.9.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.12" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="5.0.12" PrivateAssets="all" />
<PackageReference Include="Radzen.Blazor" Version="3.13.3" />
Expand Down
1 change: 1 addition & 0 deletions reqifviewer/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
<script src="_content/Blazor-Analytics/blazor-analytics.js"></script>
</body>

</html>

0 comments on commit 3f1c2c0

Please sign in to comment.