Does anyone use the Google Analytics plugin?
I recently decided to try it, but for some reason I can’t get custom events to pass to the Firebase console. Only standard, predefined events are showed.
-- Google analytics module
local ANL = {}
ANL.googleAnalytics = require("plugin.googleAnalytics.v2")
---------------------------------------------------------------------------
-- GOOGLE ANALYTICS HANDLING
-- -------------------------------------------------------------------------
-- Initialize the plugin
function ANL.analyticsInit()
print("Try to init analytics")
ANL.googleAnalytics.init()
timer.performWithDelay(1000 * 3, function()
-- Log an start app event
ANL.googleAnalytics.logEvent("Start application", {})
end)
end
-------------------------------------------------------------------------
function ANL.logEvent(eventName, paramsTable)
print("Try to log event: " .. eventName)
ANL.googleAnalytics.logEvent(eventName, paramsTable)
end
-------------------------------------------------------------------------
return ANL
-- Type 1:
ANL.logEvent("Cross promo 2 button pressed (Pixels)", {})
-- Type 2:
ANL.googleAnalytics.logEvent("CP btn pressed", {app = "Pixels"})
(both types are not working)