mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Create addUserData method in the analytics providers
This allows us to globally add arbitrary data to the events and transactions
This commit is contained in:
committed by
Jorge Martin Espinosa
parent
d1fd3020a0
commit
5ca108c526
+6
@@ -149,6 +149,12 @@ class DefaultAnalyticsService(
|
||||
}
|
||||
}
|
||||
|
||||
override fun addUserData(key: String, value: String) {
|
||||
if (userConsent.get()) {
|
||||
analyticsProviders.onEach { it.addUserData(key, value) }
|
||||
}
|
||||
}
|
||||
|
||||
override fun startTransaction(name: String, operation: String?): AnalyticsTransaction {
|
||||
return if (userConsent.get()) {
|
||||
analyticsProviders.firstNotNullOfOrNull { it.startTransaction(name, operation) }
|
||||
|
||||
Reference in New Issue
Block a user