Analytics: Track any custom event you want and use custom fields for segmentation

I’ve also had issues getteing this to work, I’ve had this in here since this announcement first went out, and yet my events on the site are empty.

local PLR = game:GetService("Players")
local ANS = game:GetService("AnalyticsService")
local player = PLR.LocalPlayer

... (below is in the event that fires when the teleport button is pressed)

print(currentMap.shortName)
ANS:LogCustomEvent(player, currentMap.shortName)
print('sent')

image

This is in a live, public game. I’ve refreshed the events on the site multiple times and nothing comes up, there’s no error, so I’m pretty confused on why its not doing anything.

UPDATE

So after posting this I had a hunch that it might only work server-side, so I did that and I actually got an error:
29 - 18-04-28

Okay, so I fixed the strings and tried again. No error. Refreshed the events on the site and it’s there!

I did not realize that this was server-side only, I reread the annoucement and the docs and either it’s not mentioned or I’m very blind, either way I’m putting this here in case anyone else had the same issues. Server side only, filter out punctuation chars. Would be nice to see this mentioned on the docs (if it isnt already, i may have just missed it)

2 Likes

Hi! We’ve just rolled out an update to fix this issue. You should now be able to send events on player remove without additional changes.