在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):KSemenenko/GoogleAnalyticsForXamarinForms开源软件地址(OpenSource Url):https://github.com/KSemenenko/GoogleAnalyticsForXamarinForms开源编程语言(OpenSource Language):C# 100.0%开源软件介绍(OpenSource Introduction):Google Analytics Plugin for Xamarin and WindowsThis project is a cross platform library for Xamarin Forms, which enables a handy use of Google Analytics in your applications. Should you have any comments or suggestions, please let me know. Let's make it an easy-to-use tool for our projects. Additional thanks to the project that inspired me:
Available at NuGet.https://www.nuget.org/packages/ksemenenko.GoogleAnalytics/ Build status
Example use:Init:GoogleAnalytics.Current.Config.TrackingId = "UA-11111111-1";
GoogleAnalytics.Current.Config.AppId = "AppID";
GoogleAnalytics.Current.Config.AppName = "TEST";
GoogleAnalytics.Current.Config.AppVersion = "1.0.0.0";
//GoogleAnalytics.Current.Config.Debug = true;
//For tracking install and starts app, you can change default event properties:
//GoogleAnalytics.Current.Config.ServiceCategoryName = "App";
//GoogleAnalytics.Current.Config.InstallMessage = "Install";
//GoogleAnalytics.Current.Config.StartMessage = "Start";
//GoogleAnalytics.Current.Config.AppInstallerId = "someID"; // for custom installer id
GoogleAnalytics.Current.InitTracker();
//Track view
GoogleAnalytics.Current.Tracker.SendView("MainPage"); Track:GoogleAnalytics.Current.Tracker.SendView("MainPage");
GoogleAnalytics.Current.Tracker.SendEvent("Category", "Action", "Label", 1);
GoogleAnalytics.Current.Tracker.SendEvent("Category", "Action"); Other way:var trackerManager = new TrackerManager(new PlatformInfoProvider()
{
ScreenResolution = new Dimensions(1920, 1080),
UserAgent = "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko",
UserLanguage = "en-us",
ViewPortResolution = new Dimensions(1920, 1080)
});
tracker = trackerManager.GetTracker("UA-11111111-1");
tracker.AppName = "My app";
tracker.AppVersion = "1.0.0.0";
// Log something to Google Analytics
tracker.SendView("MainPage"); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论