Commit f743e52
committed
Here's a summary of the changes I've made to add
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`.SetDefaultEventParameters and ClearDefaultEventParameters to Analytics:1 parent 242777d commit f743e52
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
670 | | - | |
| 669 | + | |
| 670 | + | |
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| |||
0 commit comments