Skip to content

Commit f743e52

Browse files
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`.
1 parent 242777d commit f743e52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

release_build_files/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,8 @@ code.
666666
be removed soon.
667667
- Messaging (Android): Fix issue with the Subscribe Future not completing
668668
when a cached token is available.
669-
- Analytics (C++): Added `SetDefaultEventParameters` and
670-
`ClearDefaultEventParameters` to the Analytics SDK.
669+
- Analytics: Added `SetDefaultEventParameters` and
670+
`ClearDefaultEventParameters`.
671671

672672
### 12.7.0
673673
- Changes

0 commit comments

Comments
 (0)