Reputation: 1928
I'm having trouble installing google analytics in Xamarin Studio, for android developement. (I have it working for ios).
Can someone point me to the correct installation steps? I've installed a nu-gen package for it, but I can't use the analytic name space. (My project does not know about it.
Thanks, Gerry
Upvotes: 1
Views: 874
Reputation: 74134
Via Nuget:
Search for Xamarin Google Play Services - Analytics 27.0.0
PM> Install-Package Xamarin.GooglePlayServices.Analytics -Version 27.0.0
Using:
using Android.Gms.Analytics;
Example:
var TrackerId = "{my private Tracker Id}";
var myTracker = GoogleAnalytics.GetInstance(Application.Context).NewTracker(TrackerId);
myTracker.SetScreenName("MyXammyApp");
myTracker.Send(new HitBuilders.ScreenViewBuilder().Build());
Addition Info: http://www.google.com/analytics/mobile/
Upvotes: 1