• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

HTML5 Google Analytics stopped working. Any way to troubleshoot?

M

Mobie

Guest
Google Analytics stopped working on my html5 game. It was tracking well for a couple of weeks and then stopped. I can't remember doing anything that might break it, so I am stumped. I tried copying the ID from the Google Analytics page and pasting it in again then republishing my game, but that didn't help. Can anyone offer me any advice on how to trouble shoot it?
 
Google Analytics stopped working on my html5 game. It was tracking well for a couple of weeks and then stopped. I can't remember doing anything that might break it, so I am stumped. I tried copying the ID from the Google Analytics page and pasting it in again then republishing my game, but that didn't help. Can anyone offer me any advice on how to trouble shoot it?
I'd like to know about this as well.

By the way, were you using a Google Analytics extension?

I just ported some of my projects to GMS2 from 1.4 and it looks like the old analytics functions are now obsolete, but not sure if that was the case in the previous GMS2 versions.
 
M

Mobie

Guest
I'd like to know about this as well.

By the way, were you using a Google Analytics extension?

I just ported some of my projects to GMS2 from 1.4 and it looks like the old analytics functions are now obsolete, but not sure if that was the case in the previous GMS2 versions.
The game I'm trying to use it on is one I made a couple of years ago in 1.4 and imported to GMS2. So your post seems to point to some sort of correlation. Maybe something to do with an imported game? Hmmm.

I originally tried using the built-in GMS2 GA support in the HTML5 tab and it worked for a few weeks, then suddenly quit working. I have beat my head against a wall trying to figure out what happened, but it did quit working right after I did the last GMS2 update. I've tried contacting YoYo about it but no reply from them for a number of days. They are good people and I'm sure they will get back to me when they can. Uh...I hope.

I then tried the "Easy Google Analytics" I found in the Gamemaker Marketplace. $4.95 and I couldn't get it to work.

Now I am considering using Game Analytics because they at least seem to offer pretty good documentation. I'm kind of a noob at all of this and just flail around in the dark until something works.
 
Last edited by a moderator:
Hmm, I think I actually got the obsolete functions to work with HTML5. I believe the Easy Google Analytics is necessary for native mobile app analytics though, and the old analytics_ functions are obsolete on mobile platforms. Not sure why the obsolete ones stopped working for you, though 🤨

Have you tried creating a new, blank project just to test the analytics functionality? Maybe there's something messing with the analytics in your current one?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
You could check your JS console (click address bar, press Ctrl+Shift+I) - perhaps it's being blocked due to CORS.

If you only used GA for tracking pageviews, you could get away with simply copy-pasting their two script-snippets into your index.html template like you would with normal pages.
 
Top