在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(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 AndroidThis 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. IntroductionThe Google Analytics Platform lets you measure user interactions with your business across various devices and environments. This extension makes it easy for developers to collect user engagement data from their apps.
UsageFirst of all, add the NativeGATracker.ane to your project. 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. BuildingRequirements:
Add the FlashRuntimeExtensions.h file from the Adobe Air SDK to the source/ios/Libraries folder ContributingIf you want to contribute to the project refer to the CONTRIBUTING.md document for guidelines. RoadmapYou 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. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论