Skip to content

Commit

Permalink
Add missing set user consent to SRGAnalytics.
Browse files Browse the repository at this point in the history
  • Loading branch information
StaehliJ committed Sep 11, 2023
1 parent f2322e0 commit 87295d0
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,15 @@ object SRGAnalytics {
return instance?.getCommandersActPermanentData(label)
}

/**
* Set user consent
*
* @param userConsent The user consent to apply.
*/
fun setUserConsent(userConsent: UserConsent) {
instance?.setUserConsent(userConsent)
}

/**
* Init SRGAnalytics
*
Expand Down Expand Up @@ -191,5 +200,10 @@ object SRGAnalytics {
fun getCommandersActPermanentData(label: String): String? {
return commandersAct.getPermanentDataLabel(label)
}

fun setUserConsent(userConsent: UserConsent) {
comScore.setUserConsent(userConsent.comScore)
commandersAct.setConsentServices(userConsent.commandersActConsentServices)
}
}
}

0 comments on commit 87295d0

Please sign in to comment.