How would I track the visits of my Roblox game via a script?

I am trying to find ways to track the visits of my game and display it with a GUI, however I have not found a reliable way. I have tried using models and looking for solutions but they seem outdated and no longer work.

You could try making a script that adds 1 to an intValue every time a player joins. And then data store that value?

You can use the!/Games/get_v1_games to track the visits of your game, as it responds with the amount of place visits for the game.

Make sure to use a proxy as HTTPService does not allow you to send requests to Roblox API’s. You can use or another similar one.

there’s a new thing called RoLive its a discord bot made by @Stratiz and @starchip12 that can count visits and players.

Through a script i would do what Recan said.

local http = game:GetService("HttpService") --obtaining the service for GETting
local placeId = --your placeId
--since the game's API needs a universeId oddly, we can get it by:
local universeId = http:GetAsync(""..placeId)
--hence it returns with a string, we can turn it into numbers (removing text), in a string, by:
universeId = universeId:gsub("[^%d%.%-]", "") --can be applied onto anything
--now, it's time to get the place's data after all that complicity
local get = http:GetAsync(""..universeId)
--turn it into a table
local data = http:JSONDecode(get)
--now we can get data from tables.
print(data["data"][1].visits) --basically made as: data = {["data"] = {visits = 0, other values}}

all the data information you can retrieve is found in Roblox’s Games API documentation, as stated above.

1 Like