• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

alebianco/ANE-Google-Analytics: Air Native Extension for Google Analytics on iOS ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

alebianco/ANE-Google-Analytics

开源软件地址(OpenSource Url):

https://github.com/alebianco/ANE-Google-Analytics

开源编程语言(OpenSource Language):

Objective-C 39.1%

开源软件介绍(OpenSource Introduction):

ANE-Google-Analytics: AIR Native Extension for Google Analytics on iOS and Android

This is an Air native extension for Google Analytics on the iOS and Android platforms.

NOTE The current release of the extension supports the new Application profile for Google Analytics.

Introduction

The Google Analytics Platform lets you measure user interactions with your business across various devices and environments.
This extension for AIR applications leverages the Android and iOS native SDKs provided by Google Analytics, exposing their features through a common API that can be used seamlessly on both platforms.

This extension makes it easy for developers to collect user engagement data from their apps.
Developers can then use Google Analytics reports to measure:

  • The number of active users are using their applications.
  • From where in the world the application is being used.
  • Adoption and usage of specific features.
  • In-app purchases and transactions.
  • The number and type of application crashes.
  • And many other useful metrics.

Usage

First of all, add the NativeGATracker.ane to your project.
Then you should check if the library is supported, get an instance of the tracker, start a tracking session using your Analytics ID and actually track something.

The code below shows the most basic example:

	import eu.alebianco.air.extensions.analytics.Analytics;
    import eu.alebianco.air.extensions.analytics.api.ITracker;

	if (Analytics.isSupported()) {
		var analytics:Analytics = Analytics.getInstance();
        var tracker:ITracker = analytics.getTracker(ANALYTICS_ID);

        // Track a page view
        tracker.buildView("Home").track();

        // Track an event
        tracker.buildEvent("click", "button").withLabel("play").withValue(10).track();
        tracker.buildEvent("click", "button").withLabel("stop").track();
        tracker.buildEvent("swipe", "screen").withValue(1).track();
        tracker.buildEvent("app", "quit").track();

        // Track an exception
        tracker.buildException(false).withDescription("ok, an error occurred, but it wasn't that bad").track();
        tracker.buildException(true).withDescription("panic! this shit is hitting the fan!").track();
        tracker.buildException(false).track();

        // Track a timer
        tracker.buildTiming("loading", 5000).withName("resources").withLabel("audio.mp3").track();
        tracker.buildTiming("waiting", 1000).track();

        // Track a social interaction
        tracker.buildSocial("GooglePlus", "+1").forContent("http://alessandrobianco.eu").track();
        tracker.buildSocial("Facebook", "like").track();

        // Track an ecommerce transaction
        tracker.buildTransaction(UIDUtil.createUID(), 10.5)
                .withAffiliation("In-App Purchase")
                .withTaxCost(0.5)
                .createProduct("cr-300", "300 credits pack", 7, 1).inCategory("credits").add()
                .createProduct("it-156", "extra life item", 1.5, 2).add()
                .track();
	}

The first iteration of the demo project ANE-Google-Analytics-Demo is now complete. Its purpose is to showcase the basic project setup and the features of the extension.
As a first iteration, only screens and events tracking are implemented and enabled. Over time I'll complete it by adding more tracking options to fully exploid the extension.

Building

Requirements:

  • Adobe Air SDK 3.5 or later
  • XCode IDE, iOS SDK 5.1 or later
  • Google Android SDK 2.2

Add the FlashRuntimeExtensions.h file from the Adobe Air SDK to the source/ios/Libraries folder
Add the FlashRuntimeExtensions.jar file from the Adobe Air SDK to the source/android/libs folder
In the build folder, make a copy of the user.properties.eg file and call it user.properties
Edit that file to provide values specific to your system
Use the build.ant ant script you'll find in the build folder, to build the project

Contributing

If you want to contribute to the project refer to the CONTRIBUTING.md document for guidelines.

Roadmap

You can follow the project planning on Trello, you can even vote for the tasks that are more important for you and you'll like to see implemented.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap