mariogarranz Posted September 3, 2014 Share Posted September 3, 2014 So, has anyone managed to get CocoonJS working together with Google Analytics?We're using WebView+ right now, where it's supposed to work just out of the box, but it seems like CocoonJS is redirecting all HTTP requests to file://. Even if we include the JS library inside the game and load it locally, there are no external HTTP requests from the game, so we are not recieving any information.Thanks in advance for your help Quote Link to comment Share on other sites More sharing options...
Wavertron Posted September 6, 2014 Share Posted September 6, 2014 Cocoonjs has a showDialog method I played with once that can open a web page. Possibly try that to confirm its not some sort of android app permissions issue? Just a guess Quote Link to comment Share on other sites More sharing options...
remvst Posted September 7, 2014 Share Posted September 7, 2014 In case you decide to use canvas+, I wrote an article on how to make it work: http://remvst.com/article-49-using-google-analytics-within-cocoonjs.html Might be useful for people who are looking for a solution on canvas+. In your case, I think your best bet is to get your own analytics.js file and change the protocol check or something. Rezoner 1 Quote Link to comment Share on other sites More sharing options...
mariogarranz Posted September 18, 2014 Author Share Posted September 18, 2014 Hey guys, thanks for your help. Unfortunately the minified analytics.js file is really hard to debug with all the code uglified, and we couldn't manage to get this working. I made some attempts in the obvious places where URLs were being generated, but it didn't seem to work. My colleague decided to create his own library to make XHR calls to GA servers, and that solution is working just fine We're only recieving a small amount of the information we would recieve using the standard GA because it really delivers tons of parameters, but it's good enough for us at least. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.