Game Statistics

Model Link | Donation Item | My Profile

About:

Game Statistics is a simple logger for your Roblox games. It allows you to set up discord webhooks to send server information to a discord channel. This information includes player counts, revenue, errors, and the server’s uptime.

How to Use:

  1. Go ahead and grab the model here.

  2. Next, insert it into your game and move it to the ServerScriptService.

  3. Open the script called “StatisticsHandler”.
    297159379116d0fcdce117ecc4f98afc

  4. Find the settings section of the script (it is one of the first sections).

  5. Next, update the settings to your liking. The only one you must fill out is the DiscordWebhook. If you do not know how to create a webhook, check out this post. The others I would recommend leaving as their defaults, but that is up to you. A proxy is also already provided, due to the recent blockage of Roblox to Discord webhooks. However, if you want to use your own that option is also there.

  6. Once you have done that, you are all set. To test, simply change the testing value at the bottom of the settings to true (and don’t forget to change it back after you are done testing). Then start play testing, and once you have loaded in, end the play test. Then head over to the channel where you linked the webhook. You should see something like this:
    14ede44709872edfdacfe9d5763ec05d

Customization:

I didn’t exactly design this module to be customized (unless you have scripting experience of course, then it is pretty basic). However, I will do my best to outline how-to for those of you who can not script.

First, head over to the Functions script, which is found under the main StatisticsHandler script.
03794fbfad364538e47a1287397e600f

Next, head down to the very bottom of the script. Here you will find module.serverClose, which is called when the server is closing. At the very bottom of that function, you will see the formatting for the Discord message.

This is where you will modify how the message comes through to discord. I don’t really know what else to explain here, as it is just basically strings. However, if you do not already know, when calling variables in a string you would do the following:

"this variable "..variable.." is in the middle of a string"
variable.." this variable is before a string"
"this variable is after a string"..variable

I hope that is helpful, but feel free to ask any questions and I would be happy to assist.

Conclusion:

I hope you all find this useful. If you have any questions or need help in any way feel free to ask on this post. Also make sure to check out my recent plugin, found here.

Disclaimer: The proxy I have used can be found here. I do not own or run it, however it does appear to be reliable.

25 Likes

Now this is fantastic. I’m sure it’ll help a lot of developers. Nice work!

3 Likes

Thanks, I am glad you think so!

1 Like

While it’s still fresh, I need to strongly discourage anyone from using this for the purposes stated in the thread. Discord is not and has never intended to be used as a way to log things. This is not a real statistics or analysis tool, it’s just a Discord webhook proxy.

There are proper analysis and monitoring platforms available, respective examples being GameAnalytics and Sentry, that provide you actual tooling you need to work with the information you’re receiving. A message in a Discord channel is not a replacement for the level of dedicated tooling provided by proper services and it also always carries a ban chance for misusing their API.

Best case scenario only your webhook gets banned, worst case scenario the proxy gets banned. Tools that aren’t quite compliant with a host service’s ToS should not be relied on because of this possibility.

6 Likes

This is not a real statistics or analysis tool, it’s just a Discord webhook proxy.

First off, the tool I created is by no means a proxy. The proxy is a separate tool completely that was not made by me, so I am not quite sure what you mean by this.

There are proper analysis and monitoring platforms available, respective examples being GameAnalytics and Sentry

I completely agree with the fact that there are better and more proper services available, however, this is not intended to replace or be superior to those. This is simply a more basic tool that has the added benefit of being available directly from a discord, which is quicker to peak at than those other tools.

Best case scenario only your webhook gets banned, worst case scenario the proxy gets banned. Tools that aren’t quite compliant with a host service’s ToS should not be relied on because of this possibility.

As for the fear of bans, it isn’t very realistic. This tool wasn’t developed from scratch, I just modified a tool I made for my game about a year ago, which has been running ever since. I have never had any issues with meeting/ exceeding rate limits, as I am a small developer. Due to log only getting sent upon a server closing along with the added limits such as minimum players and minimum server age makes it is hard to abuse rate limits and such. Not to mention the proxy completely complies with Discord ToS, and the general concept was also stated to be okay by Discord staff (read more about that here).

In conclusion, there are better tools that should be used, especially if you have a larger scale game. However, I have found this tool helpful (as a small game developer) in the year I have been using it and I believe others will too.

1 Like

Altogether this resource is a proxy for sending messages to Discord. The specific endpoint that’s serving the message delivery may be from someone else but on a whole your module is intended to collect statistics and feed them through that service. This is a proxy and the convenience it provides should not be an excuse to misuse and abuse webhooks.

The whole purpose of analytics is gathering data, trends and such on certain key points in your experience and using them as a means of contributing to content cadence, whether it’s improving the existing features or using them as feedback for future development. That’s why these dedicated tools provide you the utility to work with that data. Foregoing all of that for just the simple “convenience” of a Discord message isn’t real convenience, it’s laziness.

It is also extremely complacent to get defensive about the risk of bans and call it unrealistic with a single anecdotal experience. This doesn’t change that using Discord for logging is misusing its services, the whole reason why Roblox’s UserAgent keeps getting banned. Being a “small developer” doesn’t grant you exemptions from opposing feedback or freedom from a service’s limitations.

The source you provided is a tweet from 2018 that has been misquoted frequently by DevForum members when talking about Discord and logging. I’m not going to talk about that or entertain it because it’s been 3 years, coming up on 4, and things can change within that time. Additionally, the words of a single staff member do not hold precedence over the Terms of Service nor can they serve as a legal interpretation of it.

I only intended to give my personal advice here in that I strongly discourage and have always discouraged using Discord as a logging service no matter the reason and to instead look into dedicated programs. Not only is this healthy for your own growth as a developer and it can help you to track down actual issues or information needed to improve a serious project but you can relieve yourself of bad habits as well. Misusing Discord like a logging service is the same situation as treating Trello like a database alternative; you shouldn’t.

2 Likes

The model link is not working/invalid.

1 Like