forked from GameAnalytics/GA-SDK-ROBLOX
-
Notifications
You must be signed in to change notification settings - Fork 3
/
init.lua
35 lines (29 loc) · 902 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local GameAnalytics
if game:GetService("RunService"):IsServer() then
GameAnalytics = require(script:WaitForChild("gameanalytics-sdk"):WaitForChild("GameAnalytics"))
end
return {
initializeClient = function()
require(script:WaitForChild("gameanalytics-sdk"):WaitForChild("GameAnalyticsClient"))
end,
initializeServer = function(gameKey, secretKey)
GameAnalytics:initialize({
build = "0.1",
gameKey = gameKey,
secretKey = secretKey,
enableInfoLog = true,
enableVerboseLog = false,
--debug is by default enabled in studio only
enableDebugLog = nil,
automaticSendBusinessEvents = true,
reportErrors = true,
availableCustomDimensions01 = {},
availableCustomDimensions02 = {},
availableCustomDimensions03 = {},
availableResourceCurrencies = {},
availableResourceItemTypes = {},
availableGamepasses = {},
})
end,
GameAnalytics = GameAnalytics,
}