Skip to content

Page tracking event not firing on first load of site #72

@Stuart88

Description

@Stuart88

On initial load of the site, starting from any page, no page event appears in network tab.

Image

On subsequent navigations, there is an event:

Image

Not sure if I'm doing something wrong, or blazor-analytics has an issue with how it runs on first load.

I'm using Dotnet 10 InteractiveAuto and have set it up like so:

Router.razor

<Router .... />
<NavigationTracker @rendermode="RenderMode.InteractiveAuto" />
App.razor

<body class="bg-gray-50 text-gray-800">
    <Routes />
    <environment names="Development">
        <script src="_framework/aspnetcore-browser-refresh.js"></script>
    </environment>
    <script src="@Assets["_framework/blazor.web.js"]" defer></script>
    <script src="@Assets["_content/Blazor-Analytics/blazor-analytics.js"]" defer></script>

</body>

Any help appreciated - thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions