iosswiftfirebasefirebase-analyticsadobe-analytics

How can I explicitly set the timestamp when I logEvent with Firebase / Google Analytics?


I'm working in Swift with the Firebase analytics framework.

I see the FIRAnalytics header allows one to logEvent:parameters:

In the app I'm working on, we have a wrapper class Tracking that has the same API basically, but will log the same event to multiple analytics services. (Specifically, Adobe, Adjust, and GA)

What we're hoping to do is log these events locally, persist them, do a bit of post-processing on them at some point, then upload them all later, all at once. (Then flush our queue) When we initially log the event, we give it a timestamp.

So is there a way to logEvent:parameters: with FIRAnalytics where we override the timestamp that it probably adds itself within that method call? I'm guessing there's a parameter key-value I could use?


Solution

  • If you're looking to override the default timestamp that Google Analytics for Firebase uses, I don't think that's possible. I think your best bet would be to just create your own my_custom_timestamp field, and then use BigQuery to analyze your events based on that field.