I am trying to migrate an iOS application from an old Google Universal Analytics property to the new Google Analytics App + Web property.
How can I match the gtag event logging format (which our web peer application is using) to the Firebase iOS SDK to keep our reporting consistent across platforms?
For web, google explains using gtag to send these events. In their documentation, they show this example:
gtag('event', <action>, {
'event_category': <category>,
'event_label': <label>,
'value': <value>
});
But over in Firebase, google shows a logEvent method with a very different signature with some sample parameters.
Analytics.logEvent("share_image", parameters: [
"name": name as NSObject,
"full_text": text as NSObject
])
How am I supposed to square this? Should event_category
and event_label
be custom parameters on the mobile side? I am very confused as to how these can be so disparate but end up reporting to the same console.
There are no dedicated event category, action and label parameters in Firebase Analytics. Instead, you log an event by name and then optionally attach up to 25 additional parameters in order to capture additional context about the action that occurred.