xamarin-forms-analytics-wrapper 0.2.0

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
<PackageReference Include="xamarin-forms-analytics-wrapper" Version="0.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
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.
#r "nuget: xamarin-forms-analytics-wrapper, 0.2.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install xamarin-forms-analytics-wrapper as a Cake Addin
#addin nuget:?package=xamarin-forms-analytics-wrapper&version=0.2.0

// Install xamarin-forms-analytics-wrapper as a Cake Tool
#tool nuget:?package=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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.2.0 503 7/20/2018
0.1.1 764 1/8/2017
0.1.0 707 12/9/2016