You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a summary of the changes I've made to add SetDefaultEventParameters and ClearDefaultEventParameters to Analytics:
This change introduces two new C++ Analytics SDK functions:
- `SetDefaultEventParameters(const std::map<std::string, firebase::Variant>& params)`:
This allows you to set default parameters (string, int64, double, bool, null)
that will be included in all subsequent `LogEvent` calls.
If a `firebase::Variant::Null()` is provided for a key, that specific
default parameter will be cleared. Aggregate types (maps, vectors) are not
supported and will be skipped with an error logged.
- `ClearDefaultEventParameters()`: This clears all currently set default event
parameters.
Here's how it's handled on different platforms:
- iOS: I'm using `[FIRAnalytics setDefaultEventParameters:]`. `firebase::Variant::Null()`
maps to `[NSNull null]`. Unsupported types are skipped.
- Android: I'm using `FirebaseAnalytics.setDefaultEventParameters(Bundle)`.
`firebase::Variant::Null()` results in `Bundle.putString(key, null)`.
Unsupported types are skipped. I'm using `AddVariantToBundle` for efficiency
with scalar types.
- Stub: These are implemented as no-ops.
I've reviewed and updated the unit tests and integration tests to cover these
functionalities and type constraints.
I also applied code formatting using the project's script and updated and shortened the release notes in `release_build_files/readme.md`.
0 commit comments