blazor-analytics icon indicating copy to clipboard operation
blazor-analytics copied to clipboard

Analytics auto tracking

Open xXBuilderBXx opened this issue 5 years ago • 9 comments

Just found out that someone made a javascript for google analytics which helps single page apps like blazor to correctly tracks urls you visit, external links you open and other features here https://github.com/googleanalytics/autotrack it works really well for me now

xXBuilderBXx avatar Dec 20 '19 08:12 xXBuilderBXx

Yes! it works really similarly (by caching the gtag in the global scope and hooking into stuff). The reason I didn't go with it it's because I wanted to have it open to integrate extra functionality and control from C# (like loading plugins easily, etc). You can see how I expose gtag here and how I get it attached to the navigation system here. The idea is that you have navigation decoupled from GoogleAnalytics, so you could create a manual tracker and have full control at any point.

Do you have any nice feature from autotrack that I could also add here?

isc30 avatar Dec 20 '19 10:12 isc30

Yea i saw some of the code when i was checking it out but it would be nice if you could add options for the stuff like outbound link tracking. I wanted to get this working for .net core 3.1 but it's a little broken atm #7 but nice work on this.

xXBuilderBXx avatar Dec 21 '19 01:12 xXBuilderBXx

I can't know what's broken in #7 since the DemoApp works well for me. If you could point out that issue I can fix it asap and then we can have a PR for outbound etc

isc30 avatar Dec 21 '19 01:12 isc30

ServerSide Blazor is fixed now. We should be able to do this now 😄

isc30 avatar Feb 26 '20 09:02 isc30

Hi, are you still interested on this feature?

isc30 avatar Sep 20 '20 15:09 isc30

I would not mind it but as long as the main analytics part works it's fine

xXBuilderBXx avatar Sep 20 '20 16:09 xXBuilderBXx

Cool, there is a big change coming to track events, can be implemented easily after it 👍

isc30 avatar Sep 20 '20 17:09 isc30

Yes we need this!!

defcon8 avatar Feb 02 '21 20:02 defcon8

Hi @defcon8 which feature do you need? Is it outbound links?

isc30 avatar Feb 03 '21 08:02 isc30