Yeah, they need to host it as .lua files, perhaps in the typical format where folders can become modules if they have a child called init.lua, then that would make contributing really convenient.
Please funnel any GameAnalytics feedback my way, so I can help consolidate developer feedback and follow up with them directly.
Thanks!
kicketyblox
The GameAnalytics client script has the following code:
function getPlatform()
if (GS:IsTenFootInterface()) then
return "Console"
elseif (UIS.TouchEnabled) then
return "Mobile"
else
return "Desktop"
end
end
This code will incorrectly mark laptops that have touchscreens such as the Microsoft Surface Pro as mobile devices. The code should be changed to this:
function getPlatform()
if (GS:IsTenFootInterface()) then
return "Console"
elseif (UIS.TouchEnabled and not UIS.MouseEnabled) then
return "Mobile"
else
return "Desktop"
end
end
@Crazyman32 I would advise moving this thread to a forum that is public-facing, such as Community Resources: #learning-resources:community-tutorials-resources
Can confirm that is the official repo
The download button for the GitHub Repo has that URL in it Platform Overview - GameAnalytics Documentation
And @sdk_ga is the Roblox account connected to this.
A lot of the code use in this SDK was already in other GameAnalytics modules and I shared the same concern back then.
The main issue I had is with how the requests are processed all in one go. I started to implement a new GameAnalytics module which will provide better SHA256 performance by removing a lot of the tables (managed to take about .2 seconds off the total time in my testing) and streaming requests into the HMAC to reduce server load over a larger time span.
During developing this code I then had the BindToClose bug which caused the development of this module to stop BindToClose 100% Infinite Yield.
This project was also delayed by GameAnalytics as creating the HMAC from the compressed GZIP body and not on the raw body which results in not begin able to use compression when sending the request. After emailing GameAnalytics I was told that their system would not support HMAC on the raw body though I did post a feature request RequestAsync Content-Length header and compression options
I will be updating this module in the near future but currently it is WIP. This module contains the updated HMAC which should be a lot faster than anything else available on Roblox. https://www.roblox.com/catalog/02640498433
Thank you @JustSeanC for showing me this post :3
GameAnalyticsScript also uses DataStore:Get and DataStore:Set to save error count, which doesn’t respect any DataStore limits and could count wrong data since they are not using IncrementAsync.
I also noticed that they are not sending correct arguments to their addErrorEvent function in GameAnalyticsModule.
GameAnalytics Module line 234
function ga:addErrorEvent(playerId, options)
threading:performTaskOnGAThread(function()
if not isSdkReady({playerId=playerId, needsInitialized=true, shouldWarn=true, message="Could not add error event"}) then
return
end
-- Send to events
local severity = options["severity"] or 0
local message = options["message"] or ""
events:addErrorEvent(playerId, severity, message)
end)
end
GameAnalyticsScript line 89
GameAnalytics:addErrorEvent(GameAnalytics.EGAErrorSeverity.Error, m)
Nice to see them creating one, kind of sad that they didn’t do enough research into the events/ functions they use, and especially with the processreceipt mistake, this SDK could be very dangerous. I’ll probably use this in future with new games, but right now it actually seems worse than the user-created ones, which is kind of funny.
Yeah, definitely not surprising though. An SDK like this requires someone to be quite skilled with the Roblox API in general. But I’ve heard that GameAnalytics is typically really good at responding to feedback, so I wouldn’t be surprised if they got this all sorted out in the near future.
I’ll definitely be utilizing this for my next game. I’ve already made all of the changes personally.
thanks for pointing all of this out, very nice to know the community has people who go out of their way to verify information
I filed these on the Github repo. Make sure to do the same for any other issues you find.
Filed some pull requests too to fix some of these. Hopefully once the format of the source is improved it will be easier to contribute.
Hi guys,
Martin here, Lead SDK Developer from GameAnalytics. First of all thanks for all the feedback you have given so far. The issues described throughout this thread will be addressed quickly and a new release should be out tomorrow if everything goes as planned. Sorry for any obvious mistakes in the initial version, I am still learning but with your valuable feedback and know-how I am sure the GameAnalytics Roblox SDK will improve quite quickly. I can see that a few of you have also opened issues (as well as PRs) on the official github repo which is great to see. Thanks a lot. We are always open to suggestions on how to improve the SDK and it is in our interest to always keep the SDK up-to-date with fixes and improvements. So I am sure where most people would prefer to keep the discussion going on how to improve and fix bugs of the SDK if it in this forum or on the github repo or a bit of both. Look forward to collaborating you guys.
Thanks,
Martin
Lead SDK Developer @ GameAnalytics
Thanks for your response, and I am glad to see that these changes will be implemented!
Thanks for noticing this. We will fix this in the next release.
We are not using the IncrementAsync because we also save a timestamp with the saved data because the error count limit is reset every hour. Is there another we should be doing this instead?
There is a new version out now with fixes to the issues described above. We are currently working on reorganizing the files on the github for better workflow as requested by some users.
Thanks!
I can confirm that the changes have been made. The quick response to these issues is really great!
One other way to do it could be using the scope as current hour
local currentHour = math.floor(os.time/3600))
local dataStore = DS:GetDataStore("GA_ErrorDS_1.0.0", currentHour)
local errorCount = dataStore:IncrementAsync(key, step)
you should also add some limits to prevent the module from calling datastore functions to often. If a game has a lot of unique errors it could result in players data failing to save.
Good point thanks. Will fix that for next release.