Microsoft has been quite busy improving its developer-centric offerings recently. After releasing the Project Rome SDK for Android a couple of days ago, the company has now launched the Windows SDK for Google Analytics as well.
Google Analytics is widely utilized in mobile apps and websites. It is used to provide various insights such as user engagement, app crashes, views, social interaction and promotional campaigns on both Android and iOS.
Keeping its importance in view, Microsoft has released a Windows SDK for Google Analytics, so that Windows 10 developers can also utilize these services. Their SDK allows for two variations: the C# SDK can be used by both desktop apps and Universal Windows Store apps, whereas the C++ WinRT component can be utilized in UWP apps written in C++ or JavaScript. That said, both of these use the same API names, so the transition between them is supposed to be seamless.
Microsoft has also stated that SDK is built on top of Google"s Measurement Protocol and the APIs used in it bear similarities in terms of class names and design patterns with Google"s Android SDK. This has been done in order to maximize portability so that developers who have used Google Analytics on other platforms feel right at home.
The company has listed the steps to integrate the Windows SDK for Google analytics in your app:
- Register your app for Google Analytics—when you register your property, make sure you do it as a “Mobile app” and not a website.
- Add the appropriate NuGet reference to your app:
- SDK for C# apps.
- SDK for C++ and JavaScript apps.
- Last but not least, add your code to track events.
Microsoft has also pointed out that the Windows SDK for Google Analytics is open-source so developers are welcome to add their code for its improvement. The company has also encouraged users to report bugs and provide feedback on GitHub.