Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
alebianco committed Sep 8, 2013
2 parents dd5c01c + c850a0e commit ca851c4
Show file tree
Hide file tree
Showing 184 changed files with 6,614 additions and 6,489 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.swc -crlf -diff
59 changes: 51 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,57 @@
FlashRuntimeExtensions.h
FlashRuntimeExtensions.jar

._*
*.mobileprovision
user.properties

source/ios/DerivedData/
docs/
reports/

source/actionscript/bin
*.swp
*.lock
profile
*~.nib
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
xcuserdata/**/*
DerivedData/
build/

source/android/bin
source/android/gen
source/android/assets
source/android/res
*.apk
*.ap_
*.dex
*.class
local.properties
bin/
gen/

html-template/
bin-debug/
bin-release/
.actionScriptProperties
.flexProperties
.flexLibProperties
.FlexUnitSettings
.project
.fxpProperties

Icon
.DS_Store*
ehthumbs.db
Thumbs.db
Desktop.ini

.settings/
.project
.metadata

*.iml
*.ipr
*.iws
.idea/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "source/actionscript/abcore"]
path = source/actionscript/abcore
url = https://github.com/alebianco/abcore.git
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
## HEAD

### 0.2.04 (February 02, 2013)

* Updated native tracker to version 2.0b4
* API refinement
* improved build scripts
* fixed debug flag bug
* fixed bug for reading optOut value not available in iOS
* initializing dispatch period on first usage to fix inconsistent values
* ASdoc update & integration (scratch that, still having problems with iOS)
* updated build script
* moved demo project to a separate repository

### 0.2.03 (December 28, 2012)

* totally rewritten Flash API
* totally rewritten native code for Android and iOS
* upgraded to the new Google tracker (v2.0 beta 3) to support the new "Application" analytics' profile
* full support to the new Google tracker, including e-commerce, multiple trackers support, custom metrics and dimensions
* brand new demo project built specifically for mobile devices (in progress)

### 0.1.23 (December 2, 2012)

* upgraded to AIR 3.5
* updated Google Analytics libraries (Android 1.5.1 and iOS 1.5)
* improved error handling
* added account ID validation

### 0.1.22 (October 7, 2012)

* upgraded to AIR 3.4
* fixed more compatibility issues for cross-system compilation

### 0.1.21 (October 2, 2012)

* finally tested on real iOS devices, thanks to [@digitaljohn](http://github.com/digitaljohn)
* fixed incompatibility issues with earlier versions of iOS
* added some utility methods to the Enums related to custom variables

### 0.1.2 (August 17, 2012)

* upgraded to AIR 3.3
* added target in the ANT script to run the demo project on the iOS simulator
* cleaned and updated the ANT build file
* fixed issues with the iOS version of the extension

### 0.1.1 (July 15, 2012)

* updated Google Analytics libraries (Android 1.4.2 and iOS 1.4)
* added demo project to showcase usage and capabilities
* added some documentation on usage

### 0.1.0 (July 11, 2012)

* initial release
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Contributing to ANE-Google-Analytics♥ [ANE-Google-Analytics](https://github.com/alebianco/ANE-Google-Analytics) and want to get involved?Thanks! There are plenty of ways you can help!## DonationsI'am working on the project on my spare time and that means that I can't always find the time to give it the amount of time it would need or that I would like to give.If you love this project and the possibilities it offer, if you used it on a commercial project and you think I saved you some hundred hours of coding, show some appreciation :)You can send a donation through [Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=cyberpunk82%40gmail%2ecom&lc=IT&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) or, better yet, if you live in London you can offer me a beer.## TestsDue to the nature of the project, I can't possibly own all the necessary devices and os versions necessary to perform a comprehensive round of tests. So far I personally tested it on:* Android 2.3* Android 4.2* iOS 5 simulatorIt's your turn now to test it on as many devices as possible and let me know if there's still any problem to fix. I'll try to provide a simple demo project, that will cover all the extension features, to make this task easier.Refer to the [Bugs](#Bugs) section for information about reporting issues.## BugsA bug is a _demonstrable problem_ that is caused by the code in therepository. Good bug reports are extremely helpful - thank you!Guidelines for bug reports:1. **Use the GitHub issue search** &mdash; check if the issue has already been reported.2. **Check if the issue has been fixed** &mdash; try to reproduce it using the latest `master` branch in the repository.3. **Isolate the problem** &mdash; ideally create a reduced test case and a live example.A good bug report shouldn't leave others needing to chase you up for moreinformation. Please try to be as detailed as possible in your report. What isyour environment? What steps will reproduce the issue? What Platform(s) and OSexperience the problem? What would you expect to be the outcome? All thesedetails will help me to fix any potential bugs.Example:> Short and descriptive example bug report title>> A summary of the issue and the platform/OS environment in which it occurs. If> suitable, include the steps required to reproduce the bug.>> 1. This is the first step> 2. This is the second step> 3. Further steps, etc.>> `<url>` (a link to the reduced test case)>> Any other information you want to share that is relevant to the issue being> reported. This might include the lines of code that you have identified as> causing the bug, and potential solutions (and your opinions on their> merits).**[File a bug report](https://github.com/alebianco/ANE-Google-Analytics/issues/)**## Pull requestsGood pull requests - patches, improvements, new features - are a fantastichelp. They should remain focused in scope and avoid containing unrelatedcommits. If your contribution involves a significant amount of work or substantialchanges to any part of the project, please open an issue to discuss it first.Make sure to adhere to the coding conventions used throughout a project(indentation, accurate comments, etc.). Please update any documentation that isrelevant to the change you're making.Please follow this process; it's the best way to get your work included in theproject:1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes: ```bash # Clones your fork of the repo into the current directory in terminal git clone https://github.com/<your-username>/ANE-Google-Analytics.git # Navigate to the newly cloned directory cd ANE-Google-Analytics # Assigns the original repo to a remote called "upstream" git remote add upstream https://github.com/alebianco/ANE-Google-Analytics.git ```2. If you cloned a while ago, get the latest changes from upstream: ```bash git checkout master git pull upstream master ```3. Create a new topic branch to contain your feature, change, or fix: ```bash git checkout -b <topic-branch-name> ```4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your pull request is unlikely be merged into the main project. Use git's [interactive rebase](https://help.github.com/articles/interactive-rebase) feature to tidy up your commits before making them public.5. Locally merge (or rebase) the upstream development branch into your topic branch: ```bash git pull [--rebase] upstream master ```6. Push your topic branch up to your fork: ```bash git push origin <topic-branch-name> ```10. [Open a Pull Request](https://help.github.com/articles/using-pull-requests) with a clear title and description.## Do not…Please **do not** use the issue tracker for personal support requests. Please **do not** derail or troll issues. Keep thediscussion on topic and respect the opinions of others.
Expand Down
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2011 - 2013 the original author or authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# 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](https://support.google.com/analytics/answer/1009714) 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:
```ActionScript
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](https://github.com/alebianco/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](CONTRIBUTING.md) document for guidelines.

## Roadmap

You can follow the project planning on [Trello](https://trello.com/b/wk7wHEhS), you can even vote for the tasks that are more important for you and you'll like to see implemented.
Binary file removed bin/NativeGATracker.ane
Binary file not shown.
Binary file removed bin/NativeGATracker.swc
Binary file not shown.
51 changes: 0 additions & 51 deletions build/Demo-app.xml

This file was deleted.

Binary file removed build/ant/lib/ant-contrib-1.0b3.jar
Binary file not shown.
Loading

0 comments on commit ca851c4

Please sign in to comment.