Google Analytics [Proof of Concept / Unsupported]

Future Freak

  • Posts: 413
This is my attempt to port over the Haxe port of the PHP version of google analytics.
Work and commitments are a bit hectic at the moment - hence why this is not in a fully finished/tested state - but I'd thought I'd let you guys have a play with it and hopefully someone can figure out the niggling issues.

I've attached the extension as a zip file and an example game to show it's usage.  You need to replace the UA-XXXXXXXX-X  and url in InitGa with your own google analytics code.

To test it's all working - you can use Google Analytics Realtime to see the PageViews being registered - however, events do not show here and I've found it normally take at least 10 mins to show up in the stats when they do.

PageViews seems to work perfectly fine - however,  Events seem very patchy - for some reason in Flash the data sent is being prepended with 0!  - so with a category/action/label of  "button", "pressed" & "Button 2" - the data sent to google appears as this: (0!Button 2*button*pressed)  - Very weird.  Any help as to why this is happening would be appreciated.

Any bug fixes/updates - please post them in here - as I want to use this to be the official support thread for this extension.

« Last Edit: February 03, 2015, 08:40:26 pm by Jon »

Richard Sneyd

  • *
  • Posts: 187
Hi Future Freak,

First of all, thanks for sharing this extension. I've been navigating your code for a while, because I need to make a small tweak to one of the lines to enable 'Demographics & Interest Reports'.

The google guide for making the change to the ga.js version is here: https://support.google.com/analytics/answer/2444872?hl=en&utm_id=ad

My question is, in your extension, where can I find the equivalent line of code?

Hope you can help, many thanks.

Richard

FortySe7en

  • Posts: 304
I'm hoping for an Open FL version, unless the one that's here works.
Keep up the great work!

sugarontop

  • Posts: 41
I keep on getting the following errors when trying to run your example:
[ERR] java.lang.StringIndexOutOfBoundsException: String index out of range: -2
[ERR] java.lang.StringIndexOutOfBoundsException: String index out of range: -2
[LOG] Unexpected problem on thread Thread-31: String index out of range: -2

The same happens if I try to integrate in my app.

TwistedIdentity

  • *
  • Posts: 242
I keep on getting the following errors when trying to run your example:
[ERR] java.lang.StringIndexOutOfBoundsException: String index out of range: -2
[ERR] java.lang.StringIndexOutOfBoundsException: String index out of range: -2
[LOG] Unexpected problem on thread Thread-31: String index out of range: -2

The same happens if I try to integrate in my app.

I think this extension only supports the NME version of Stencyl and not the OpenFL Stencyl 3.0 which the public now have.. I hope this dude works on an OpenFL, because it would really be useful for me.
My Critter Android http://bit.ly/1gJyUs4
TI's FB Page: http://on.fb.me/1ijla4Y
Deadly Space Boss Arena 2: http://goo.gl/KIuowG

Follow me on Twitter: @jettas88

sugarontop

  • Posts: 41
Any news on this? I would happily pay for this kind of support

aprotasenya

  • Posts: 10
Hey everyone!
This could seem like a necropost, but I'd give it a shot.

Could someone put together a simple and short guide how to make those pageviews work at least?

I have installed and enabled the extension, I see three blocks, but I have no idea what should I do with them. I also was unable to find the InitGa, where I have to put my GA tracking ID.
Would be extra-awesome if someone of more knowledge could help.

Thanks.

salahdev

  • Posts: 6
up guys, anyone ?

Max Finch

  • *
  • Posts: 2183
If anyone want's to continue work on this I found this extension which works in openfl.

https://github.com/emibap/GAnalytics

vikingpotato

  • Posts: 854
Is this alive for the latest 3.x series ? I had working on a mobile deal and the publishers demand google analytics integration :(