Patrefans
Renpytom from patreon
Renpytom patreon

Adding Google Analytics to Your Visual Novel

🕑 Added 2018-10-31 22:32:43 +0000 UTC
Adding Google Analytics to Your Visual Novel

Comments

oldhiccup

From version 8.0.3 with python 3 it is necessary to change a line from `queue.append(urllib.urlencode(kwargs))` to `queue.append(urllib.parse.urlencode(kwargs))` on analytics.rpy As of July 2023 the Universal Analytics standard. will be discontinued by google. This way the sending of events will undergo some changes, so the analytics file will need some changes. I made some changes to the file for my scenario. But I believe that in a scenario where other developers will use it, it's better to think of a reusable pattern. The planned changes are in this link https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=gtag Everything works fine for me by changing the points described in the google documentation.

Adn700 - NSFW

Working in Android ?

Cookie NomNom

Thanks Suhalmi! That's great info. How did you find out that the mobile version requires Firebase? PLEASE do share if you happen to make mobile tracking work using Firebase!

Suhaimi Zainal Shah

I can only get the data tracked on pc applications but not the published android app if I follow your steps. The Google Analytics mobile app version requires the use of Firebass which I'm not sure about either.

Cookie NomNom

Hi Bruni. Thanks for your response. Yes, I select the option that the app needs to have access to the internet when I build the app on RenPy. Players can make in-app purchases as well, so I think I'm pretty sure that the app can access the internet.

Bruni Multimedia

Is your app able to access the internet? The issue could be there.

Cookie NomNom

One question for you PyTom - should this work only on web or is it supposed to work on mobile as well? I can see all the events on web, but am getting nothing when I try this on mobile...

Cookie NomNom

I've implemented this and it works like a charm! Very easy to implement as well. Thanks PyTom!!!

Bruni Multimedia

This is a huge feat! Thank you!!!

MANITU Games

That's something I was waiting for, thank you!

geckosart

That's pretty wild ^^ Looks like it's not too difficult to implement either. Thank you for taking the time to write that up!

Renpytom

Exactly. I found it funny that it sounds like a meme, but to a dev, it's serious business. Or at least semi-serious.

Renpytom

No, you can't. If a user opts out, the framework won't send any data.

Glenn

Very nice. I really like these guides. Its a great way to learn more about Renpy. I'm tracking events using Firebase instead, and after some months collecting data I can say that its really great to understand the flow of the game. I could see where ppl were leaving and discover what ppl were loking while playing the game. "Who is best girl?" sounds like just a meme, but its really vital to game developers. You need to understand what your players are looking for, so you can give them that.

noeinan

That's awesome! Can we tell how many people opted out too?


More Creators