AIR for iOS and Google analytics - ios

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...

Related

OpenTok SDK - Null reference error - Xamarin iOS

I have built a simple Xamarin iOS app to subscribe (no publishing) to a single stream and display it in my primary view. The app will connect to a screen capturing stream from a desktop application that will be publishing the stream.
My Setup
Windows VS paired to a remote Mac, running a simulator on my local windows environment.
Using Xamarin.OpenTok.iOS (SDK v2.17.1) Nuget package in project.
My project is not a Xamarin Forms cross-platform application, but solely an iOS application.
OpenTok session and tokens generated in project management portal. I have attempted both "Relay" and "Routed" with the same results. I have been creating tokens with a 7 day expiration.
In developing the implementation of the OpenTok SDK into my app, I have followed the project found here
The Issue
I am creating a new session passing in my newly generated API Key and Session Id and then Connecting with my subscriber token.
_session = new OTSession(_apiKey, _sessionId, null);
...
_session.ConnectWithToken(_userToken, out error);
I am also subscribing to relevant Session events (ConnectionDestroyed, DidConnect, StreamCreated, StreamDestroyed, DidFailWithError).
After starting this connection I am given the following output and none of the events I am subscribed to are invoked.
Output Log - StackOverflow would not let me paste the log here
I am also seeing an attempted connection to the Session in the OpenTok Inspector.
Session Log
I am aware of this ticket and have confirmed it is not an expired token. I am pretty confident that this null reference is coming from the OpenTok SDK source code and not my code but cannot tell what it is. The error will completely freeze my app as the looping does not stop. Any help and guidance would be appreciated. So the questions are:
What is causing this error and how can I fix it? Am I missing an initialization step?
Is the iOS Simulator the real issue?
Thanks
a simple Xamarin iOS app to subscribe (no publishing) to a single
stream and display it in my primary view. The app will connect to a
screen capturing stream from a desktop application that will be
publishing the stream
This is possible to implement with Xamarin Vonage Video API SDK. I will try to explain that as detailed as possible, feel free to skip ahead.
You started correctly with the Xamarin samples.
In fact, there are only 2 changes you need to do to achieve your goal with Xamarin.iOS app (not Xamarin.Forms, will get to that later):
Update ApiKey, SessionId and Token in OpentokTestConstants.cs (here) file
Comment out Publish() in the OpentokStreamingService so that the app only subscribes to video streams in the session and does not publish camera stream
Here is a screenshot running the sample app with these changes in iOS simulator and viewing a stream published from the web (I used the "The OpenTok Playground" tool for that)
Now, regarding Xamarin.Forms.
There is no sample for Xamarin.Forms, unfortunately. If you can share a sample app (without ApiKey/SessionId please) I'd be glad to look at it.
Generally, a logic for video calls on Xamarin.Forms is:
have DependencyInjection wiring to expose key methods from OpentokStreamingService that is implemented in iOS/Android samples (docs on how you do that in Xamarin.Forms)
implement a custom Xamarin.Forms view + renderers for it. The view does not need to do anything. The renderer should be doing at least one thing - passing down a reference to a native view to the OpentokStreamingService using a code like this:
_opentokService.SetStreamContainer(NativeView, false);
where NativeView is a native (Xamarin.iOS/Xamarin.Android) view (not Xamarin.Forms view). You can get that reference in the renderer's ElementChanged method.
This doc from Xamarin covers that well.
After the selected line, Control will have a native view reference that you just need to pass to OpentokStreamingService.
That will get you a scenario working in Xamarin.Forms. I hope that this answer helps!
P.S.: Logging with Vonage Video API Xamarin SDK on iOS
There is a better way to get logs for diagnostics purposes with iOS SDK.
A call like that before any OpenTok SDK calls would give you a very detailed log of what's going on:
OpenTok.OpenTokExtraLogging.EnableOpenTokLoggingToConsole();
It will look like this:

Facebook pixel event PURCHASE not registering iOS-sales

We have an Woocommerce site and run ads on Facebook and Instagram. When potential customers click on these ads our website is loaded in the in-app browser that Facebook and Instagram uses. What we've discovered is that the Facebook pixel is not sending any purchase data back to Facebook regarding users on iOS. This again means that it's registered as 0 conversions in iPhone and iPad, skewing the audience and algorithms for optimised ad delivery. (The data comes back correctly on Android and computers.)
We've tried several plugins to see if it's plugin related issue, among them Facebook for Woocommerce, Pixel Caffeine and PixelYourSite. No change there.
What is also interesting, is that the metrics for iOS dropped to zero at the same time I switched from another theme to the Divi-theme (which is a page-builder theme for Wordpress). So it may seem like the error is directly related to the theme, but then again there must be something iOS-specific since it works on all other devices, and the theme change though suspicious may be irrelevant.
TLDR: The pixel tracking works exactly like they should on all devices except on iOS in-app browser where the website is displayed as it should be, but where the pixel is not registering purchases.
Edit: We receive other pixel data from iOS as well, it seems that the order confirmation page is the one that is "blocked".
Example of landing page we use for our ads: https://www.friskforlag.no/frisk-graviditet/
Received help from Elegant Themes, developers of the Divi theme. There is a bug in the current version of Divi that will be fixed in the next 2-3 versions. The solution was to comment out a line of code in the core > functions.php file, and after that we were able to track purchases on iOS again.

iOS Conversion / installation Tracking

Objective: i want to fetch my custom parameter(referrer) from iTunes link upon installation of my application in device.
iTunes links look somethings like this:
https://itunes.apple.com/in/app/complete-gym-guide-lite/id550449574?mt=8
If i append my parameter say(&referrer=xyz)at the end and i open this url in ios safari browser then it will prompt to download the application.
Confusion: will app store send my parameter(referrer) to my application on launch so that i can fetch it in my application and use it.
In case of Android play store link look like this: http://play.google.com/store/apps/details?id=&referrer=guid%3D%guid%
As you can see referrer parameter at the end of url. Once app is installed in device then play store will send this parameter to app using INSTALL_REFERRER broadcast receiver. We can use this parameter.
What i tried OR Other people doing for conversion tracking: Other people are simply sending static data to their server at the first time opening of app and maintain a flag in NSDefault to make sure that app does not send same data again. I can also do the same as well as alternate ways suggested in below links but i want to do something with custom parameter.
I have already seen below links:
iOS - track which ad campaigns my installs are coming from
Tracking iOS installs from multiple marketing sources
Please help me out.
As #Aditya said, for now, Apple is not sending any referrer (or params) from iTunes to installation.
The only way you have it's to use a third party sdk to get your installations.
I have been working on a own sdk to get this but the way to get any info it's really hard and not really confident to use it. So endly we used some third party which are using many techniques to getting this (as fingerprint data, App2App methods, etc...)
I have tested appsflyer sdk and facebook sdk, they work as expected, use this or any else you prefer.
Hope this helps

Google Analytics v3.2 requires Mobile App Property, killing legacy properties

We implemented Google Analytics v1 years ago, when there was no mobile app property, things were just website properties.
Given that Universal Analytics is coming, we decided to switch over the latest iOS GA SDK (v3.2). I was unable to get any data collected in my existing properties, and I was able to narrow it down to the fact that my legacy properties are website properties. If I force it to use a newly created Mobile App property things work fine, but it will not work at all with the legacy properties.
Is there anyway to get Google Analytics v3.2 SDK to work with the legacy properties? They have a lot of data that we would like to keep integrated going forward.
I discovered that I can get this to work with my existing property, by creating a new view (profile). Apparently, the view(profile) that we have had for years is something like a website view, and will continue to receive the data from the older v1 SDK of the app out there that are posting to it. But I can also create a new view(profile) with "Mobile app" that will get the data from the v3.2 SDK.
Unfortunately this means that I have to add manually up two different view to get my complete picture. I renamed the existing view "legacy" and named the new view "mobile".

Visit data issues using Google Analytics with Adobe Air for 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?

Resources