So I'm having issues logging event parameters from my application to the Firebase console. The events and their parameters show up as expected on Firebase's DebugView, and when I click on the events on the Events tab, the events all show up. However, there is no data available for the parameters I logged, even though they are default Firebase params.
I've done a decent amount of reading into Firebase's somewhat confusing documentation, and see that in order to see custom parameters show up on the dashboard, I need to register them within the application (even though there are some hard limits on the number of textual parameters we're allowed). However, I didn't read anything about such limits being imposed on Firebase's default events and default parameters, or that we would even need to register default parameters.
I've abstracted Firebase's logEvent functionality into the following logic (included a getter because I'm using Firebase throughout multiple pods):
func sendEvent(eventType: String, toolName: String, toolAction: String, /*actionLabel: String,*/ actionDetail: String?) {
switch provider {
case .firebase:
if actionDetail != nil {
Analytics.logEvent(eventType, parameters: [
AnalyticsParameterOrigin: toolName,
AnalyticsParameterMethod: toolAction,
AnalyticsParameterContent: actionDetail
])
} else {
Analytics.logEvent(eventType, parameters: [
AnalyticsParameterOrigin: toolName,
AnalyticsParameterMethod: toolAction
])
}
case .GA:
print("Event received w/deprecated GA")
}
}
func getAnalyticsEventType(eventString: String) -> String {
switch eventString {
case "selectContent" : return AnalyticsEventSelectContent
case "viewItem" : return AnalyticsEventViewItem
default: return ""
}
}
And call my custom method as follows:
ValuesExploration.analytics?.sendEvent(eventType: ValuesExploration.analytics?.getAnalyticsEventType(eventString: "selectContent") ?? "", toolName: "Values", toolAction: "Happiness Sticker Selected", actionDetail: value.name)
Upon calling the method, it logs the default event to the dashboard, but none of the default parameters. Any input as to why this is happening would be greatly appreciated, thank you in advance!