Visit data issues using Google Analytics with Adobe Air for iOS - ios

We are using GA for Flash in our iOS app ported over with Adobe Air and are seeing some funky numbers being collected in Google Analytics. We ran some tests and saw that every time the app was opened it would count both a new visit and a new unique visit, even if it was just a minimize and re-open.
We would assume that the 30 minute time out would be in effect here and that even on a quick minimize and re-open that GA would count that as one visit. This doesn't seem to be the case.
Does anyone know how we could set-up the GA implementation to record unique visits based off of a user ID given on first launch of the app, and/or have it accurately count visits?
Has anyone seen something similar to this before?

Google Analytics allows you to set up Custom Events to track user interactions so this could be dispatched depending on a flag stored in a config file (to determine if it is the first time the application is run).
Depending on your implementation of Air, i.e AS3 / Javascript, if you are using AS3 you may have to utilise the ExternalInterface api to call a javscript method from the application.
This would then allow you to track these custom events and ignore the erroneous default visits?

Related

Facebook Analytics SDK for iOS app: how to disable value tracking for non-valuable events like App Install or Start Trial?

I'm running Facebook Ads campaigns for my iOS app and quite naturally I have Facebook Analytics SDK integrated inside my app to track App Installs and Start Trial events to measure the "quality" of the traffic my campaigns bring.
At the Analytics settings page inside Facebook developer dashboard.
https://developers.facebook.com/apps/XXX_APP_ID_XXX/analytics/settings/?business_id=XXX_BUSINESS_ID_XXX
I have the option Log In-App Events Automatically (Recommended) set to "Yes", which I presume enables the tracking of App Install and Start Trial events. There's also a Shared App Secret field filled in with the value from iTunesConnect.
Indeed, the App Install and Start Trial events have started to appear inside Analytics dashboard
https://www.facebook.com/analytics/XXX_APP_ID_XXX/AppEvents?__aref_src=landing_page&__aref_id=entity_name&force_desktop=1&user_id=XXX_USER_ID_XXX
However I noticed when viewing the stats for just App Installs there's a quite considerable value in USD attributed to these events. I decided to take a closer look into these events using Event Debugging
https://www.facebook.com/analytics/XXX_APP_ID_XXX/most_recent?since=1577923200000&until=1580256000000&__aref_src=landing_page&__aref_id=entity_name&force_desktop=1&user_id=XXX_USER_ID_XXX
and selecting "App Install" in the events filter.
There I saw that some (only some and as if randomly) App Installs have a value associated with them. To me this is an unexpected behavior since I can't imagine revenue being made by just receiving an install.
Same goes for Start Trial event, which always has the value associated to it (equal to the sale price of a subscription period) and once again this makes no sense to me because started trials themselves bring no value to me. They may be canceled or may end up in Billing Retry when the user has no money on the bank card attached to their iTunes account, etc. I track the conversions from Start Trial to Purchase on my backend separately with great precision and only these conversions as well as subsequent renewals would bring real value to my business.
I can and will track these Purchases manually and post them to Facebook (server-to-server style) and I will supply the corresponding value to these events myself, which will help to understand the overall performance and ROI but I need to clean my stats from these "false" automatically and erroneously attributed values to App Install and Start Trial events first.
I've already reported this issue to Facebook few days ago, however they seem to be slow in handling such requests so I've decided to ask here if anybody ran into similar issue.
Add this to your plist file to disable Auto Event Logging
<key>FacebookAutoLogAppEventsEnabled</key>
<false/>
Thanks to Lena Bru for giving enough food to find a solution.
The Facebook documentation is scarce on the raised questions and the support answer literally headed me towards the documentation. To recap things, there were 2 main issues (the second one I've mentioned in the comments to Lena's reply):
Facebook was tracking value for the events, which brought no value to my business
Some of the events I've sent from backend didn't appear in the campaign reports
To solve both of these problems, I:
Turned off the value tracking option in the Facebook app settings
On the client side I've started setting up User ID (which the client receives from backend) according to Facebook documentation
I've started to send all of the events, which I wanted to view inside Facebook business cabinet, under custom names from backend. I've supplemented them with app_user_id parameter (see Advanced Matching for App Events in Facebook documentation) so that they could match the App Installs reported from client.
There's still a smaller issue left (it feels like Facebook reports include 20% less installs than actually happening) but the current setup is already something to begin with.

GPS location tracking of others in Corona SDK

I am building an iOS app in Corona SDK and am trying to implement a map feature where the user can see where they are compared to where others with the app open are. What would be the best way to go at this?
I already wrote the code for finding the current location of the owner of the device, but how do I retrieve data from other users?
Any advice is greatly appreciated!
This is very broad question, but basically you need a server (on the web) where each user's location gets stored while the app is open, and the app can request the location of other users specifically, at some time interval. Presumably you would need to have some form of rights management since every user would typically be interested in seeing only a small number of other users, and every user would want to have control over who can see their location.
One thing to remind users of is that the reported position is that of the device, not that of the user, and that it is the last reported position, not necessarily current (not all devices are on cellular network or wifi at every moment), so you'd also want a time-of-last-update to be shown with every location marker.

Google Analytics for iOS 1-time (per user) event tracking

I am using Google Analytics iOS SDK (version 2 but will upgrade if it solves problem). How can I track what percentage of my app users have pressed a certain button at least once? I set up a lot of event tracking, thinking this would do it, but the reports are in terms of sessions not users. E.g., it will show what percentage of sessions included an event, so a single user may be counted multiple times. I defined a custom dimension variable that is unique for each app install, but I don't see how to use that as aggregation unit.
All I can think of is to define my own "one time events" by keeping my own database on the device and only pass to Google Analytics the first time it occurs. Is there no better way?
Google Analytics now offers User segment. You could create a user segment, and use the particular event you're interested in as a condition.
In the context of app measurement, a User is defined as a unique Client ID, which is the random ID generated by the GA SDK when the application first runs. It remains stable for as long as an app is installed.
More details here: http://analytics.blogspot.com/2013/07/re-imagining-segmentation-in-analytics.html

AIR for iOS and Google analytics

There seems to be conflicting information on whether google analytics will work with an AIR for iOS application
Have developed a kiosk based AIR for iOS game and need tracking, specifically image uploads to Facebook.
There is a thread here
Does Google Analytics Tracking for Flash works in packaged air application for IOS?
which points to both the old gaforflash sec
http://code.google.com/p/gaforflash/downloads/list
and also this native extension
https://github.com/alebianco/ANE-Google-Analytics
which is a lot more recent.
But there is a warning on the latter
'The new "app" profile on the Google Analytics dashboard won't accept any data from the trackers (1.5 and 1.5.1) currently used.'
Also there is a warning on the official Google developers page which I also assume hasn't been updated in many years
Note: Currently, Flash tracking is available for any Flash content embedded in a web page. Tracking of data sent from Adobe Air, Shockwave, or via the Flash IDE (e.g. using Test Movie) is not supported at this time.
https://developers.google.com/analytics/devguides/collection/other/flashTrackingIntro
So some confusion. Can anyone confirm whether the alebianco Native Extension will work properly?
My extension (https://github.com/alebianco/ANE-Google-Analytics) has been updated a few months ago, it now supports the new app profiles gracefully :)
Any info on whether the old GAForFlash component still works? I've been trying and so far, no dice.
I copied analytics_flash.swc to Flash CS6's components folder(and restarted the Flash IDE - it doesn't work if you don't restart), which got the GAFF component to show in the component panel. I've tried dragging the component on the stage, setting it's values in the properties panel, and then calling trackPageview:
testTracker.trackPageview("/testPage");
And the second thing I've tried so far is to instantiate the analytics plugin via code:
var GAtracker:AnalyticsTracker = new GATracker(this, GAid, "AS3", true);
GAtracker.trackPageview("/myTestPage");
In both these cases, I'd had visual-debugging turned on(by passing the 4th variable as true when instantiating via code, and via the property panel otherwise). And in the visual-debugger everything seemed alright, and I got "Gif Request #x sent" after each analytics call. But nothing showed in Google Analytics' online portal. While setting up analytics, I'd selected that the app was a "mobile app" rather than a "web-page", and it'd given me links to GA's droid/iOS SDK. GAForFlash's official documentation says it may not work with AIR apps, as mentioned above. But when I published it with an HTML wrapper Not sure if the problem is with my implementation, or with GAForFlash...

What code is needed to be notified in real-time whenever my iOS app is downloaded?

I recently published my first iOS app and felt really dissatisfied with apple's iTunesConnect portal for tracking app sales. Specifically, I can't tell what time of day the app was downloaded, and I have to wait for the results until the next morning.
Does anyone know a piece of code that can be unobstrusively inserted in my app that will somehow report to me after if has been installed for the first time? I don't want any privacy/rules violations, I just want the app to report that it has been downloaded, and maybe a few metrics regarding country/time/etc.
Thanks for the help!
EDIT:
Regarding a first run 'phone home,' is it possible to execute some HTML without having the user knowing (I don't want to interrupt their experience by opening a webbrowser). For example, some javascript from a statcounter? If not, what can I do?
There are a lot of analytics tools that can help you get better metrics.
Flurry
Google Analytics
Mixpanel
Kissmetrics
Google analytics gives you usage information in real time, which is nice.
Also, if your users log in through Facebook, they provide some interesting analytics as well.

Resources