Google Analytics trick for CocoonJS exported apps

Get help using Construct 2

Post » Mon Sep 21, 2015 11:04 am

Hi everyone!
I just found this solution, to bring GA in my game exported for CocoonJS:
This is an interesting method, that doesn't needed an external hosting. But description for that I think is written for programmers, but not for any other people :) Unfortunately author don't answer.

Use analytics.js (GA Universal Analytics) with Ludei's CocoonJS Canvas+ apps by making use of the WebView
No external hosting is needed anymore.

Files on Git:
1) analytics.js
2) analytics_web_view.html
3) cocoon.js
4) index.html (Me: not same as in Construct2 game archive)

How To use:
1) Download and add contents to file analytics.js.
2) Set up a new property in Google Analytics to track a mobile app.
3) Modify the web property ID (UA-#) in index.html
4) Test it on your phone using Canvas+ environment on your CocoonJS Launcher.
5) Your ScreenView should be visible in your real-time Google Analytics report.

Anyone who can understand what I should do with these files after all changes - Please comment here.
It would be useful for many people.
Thank you!
Posts: 45
Reputation: 2,852

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests