I have implemented Google Analytics using @britzl ’s extension: GitHub - britzl/defold-googleanalytics: Google Analytics implementation for the Defold game engine
It works when I trigger my custom events and I can find the details in Analytics. However, now I recently enabled the automatic crash/exception tracking I can’t figure out if error logging isn’t working or if I just don’t know how or where to find it.
You can see in this output that a) there has been an error, and b) Google Analytics has sent a hit:
However, in Analytics I don’t see anything related to the error (I have scoured the other pages as well and can’t find anything):
In contrast, when I trigger one of my custom events then things show up as expected:
I thought Err was interfering by somehow intercepting the error call, but I disabled it and it doesn’t make a difference.
I don’t really know what the next step is (setting something up in Analytics?) so if anyone has any insight I’d appreciate it.
1 Like
Google analytics send only engine crashes. You should send lua error by yourself.
Somethink like this.
sys.set_error_handler(function(source, message, traceback)
--do not send same message
self.exception_prev_time = self.exception_prev_time or 0
if (self.exception_prev == message and (os.time() - self.exception_prev_time) < 60 * 1) then
else
GA.exception(JSON.encode({ source = source, message = message, traceback = traceback }, false));
self.exception_prev = message
self.exception_prev_time = os.time()
end
1 Like
Sorry i was wrong. It use sys.set_error_handler() inside.
Mb something override sys.set_error_handler.
Try send it by yourself.
1 Like
Also there are no default view for exception. You need create custom report to see exceptions. =)
1 Like
Thanks - your last post was the solution!
For future generations uncovering this lost knowledge…
4 Likes
britzl
March 30, 2020, 8:28am
6
Thanks for sharing! I updated the instructions for the exception to include this.
3 Likes