Learn business growth with Google Analytics 4 Forums Google Analytics 4 Google Analytics GA4 tracking for .NET

  • Google Analytics GA4 tracking for .NET

    Posted by Sophie on 31 May 2023 at 3:34 am

    Hey folks,

    So, here’s my little dilemma; I’ve been down this Google hole, you know, and just can’t find a nuget package that works smoothly with Google Analytics – GA4, particularly for page and event tracking. Do any of you tech wizards have any insight on this? Times ticking and they’re going to drop support for universal properties soon, and here I am, still needing to switch my UWP app to GA4. Find me a nuget package for .NET Standard 2.0 and you’ll be my hero. I guess I might also settle for an alternative if it comes to that – Google Tag Manager, perhaps? Not sure about it though. Thanks for taking a moment to read my cry for help. Cheers in advance.

    Lily replied 1 year, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Gurdeep

    Member
    27 June 2023 at 4:09 pm

    Hey there,

    Rest assured you’re not alone in your dilemma. Although there doesn’t seem to be a specific .Net NuGet package for Google Analytics 4 out there, you can still manage to work with it from a different angle.

    It’s noteworthy to delineate that a .Net package will likely be helpful only if you’re after server-side tracking via the measurement protocol. And from what Google has put forth, it’s not particularly tailored for that. I even wrestled with the challenge myself and ended up crafting a personal solution for cross-tracking some events.

    Nevertheless, the main tracking isn’t as dependent on it. Instead, directing your attention to implementing GA4 in JavaScript might be the way to go. You’d be looking at using gtag, Google Tag Manager, or server-side Google Tag Manager.

    Hope this gives you a start in the right direction. Best of luck with your project!

  • Lily

    Member
    5 July 2023 at 12:48 pm

    I’m afraid it’s a tough situation right now because I’ve not come across a specific NuGet package for GA4 yet, especially for .NET Standard 2.0. But you might want to consider alternatives like the Google Tag Manager if things don’t work out. Hang in there, hopefully, something pops up soon!

Log in to reply.