xamarin-forms-analytics-wrapper 0.2.0

Google Analytics Wrapper for Xamarin.Forms

xamarin-forms-analytics-wrapper is a library which warps Google Analytics to Xamarin.Forms. Please check the website for further details.

Install-Package xamarin-forms-analytics-wrapper -Version 0.2.0
dotnet add package xamarin-forms-analytics-wrapper --version 0.2.0
paket add xamarin-forms-analytics-wrapper --version 0.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

xamarin-forms-analytics-wrapper

##What is this?
xamarin-forms-analytics-wrapper is a library which warps Google Analytics tracking to Xamarin.Forms.

I'm very eager about your feedback, so do not hesitate to create an issue or feel free to improve my code via a contribution.

###Setup and Usage

  1. Install the package via nuget into your PCL and platform specific projects.
  2. Get your Analytics-Id (iOS AppDelegate.cs, Android: MainActivity.cs)
  3. Add the registration call to your platform specific main class (see sample).

Example Android implementation of the Init call:

protected override void OnCreate(Bundle bundle)
{
	base.OnCreate(bundle);
	Forms.Init(this, bundle);
	var gaService = AnalyticsService.GetGASInstance();
	gaService.Init("UA-12345675-1", this, 3);
	gaService.OptOut = false;
}

Example iOS implementation of the Init call:

public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
{
    Forms.Init();
    var gaService = AnalyticsService.GetGASInstance();
    gaService.Init("UA-12345675-2", 3);
    gaService.OptOut = false;
}

More examples on my blog.

xamarin-forms-analytics-wrapper

##What is this?
xamarin-forms-analytics-wrapper is a library which warps Google Analytics tracking to Xamarin.Forms.

I'm very eager about your feedback, so do not hesitate to create an issue or feel free to improve my code via a contribution.

###Setup and Usage

  1. Install the package via nuget into your PCL and platform specific projects.
  2. Get your Analytics-Id (iOS AppDelegate.cs, Android: MainActivity.cs)
  3. Add the registration call to your platform specific main class (see sample).

Example Android implementation of the Init call:

protected override void OnCreate(Bundle bundle)
{
	base.OnCreate(bundle);
	Forms.Init(this, bundle);
	var gaService = AnalyticsService.GetGASInstance();
	gaService.Init("UA-12345675-1", this, 3);
	gaService.OptOut = false;
}

Example iOS implementation of the Init call:

public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
{
    Forms.Init();
    var gaService = AnalyticsService.GetGASInstance();
    gaService.Init("UA-12345675-2", 3);
    gaService.OptOut = false;
}

More examples on my blog.

Release Notes

0.2.0:
       * update sample and library to Xamarin.Forms to 3.0.0.482510
       * update Google.Analytics to 3.17.0.2 on iOS
       * update Xamarin.GooglePlayServices.Analytics to 60.11.42.1 on Android
       * set iOS Sample to x68_64
       * set Android Target to 8.1
0.1.1:
       * Change: fix iOS timing tracking
0.1.0:
       * Change: Initial release

Version History

Version Downloads Last updated
0.2.0 59 7/20/2018
0.1.1 288 1/8/2017
0.1.0 213 12/9/2016