Jump to content

CocoonJS + Google Analytics


mariogarranz
 Share

Recommended Posts

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...