mirror of
https://github.com/foomo/sesamy-go.git
synced 2025-10-16 12:35:43 +00:00
feat: add consent
This commit is contained in:
parent
a44d43422a
commit
dbc3217726
@ -1,6 +1,11 @@
|
|||||||
package mpv2
|
package mpv2
|
||||||
|
|
||||||
type ConsentData struct {
|
type ConsentData struct {
|
||||||
AdUserData *Consent `json:"ad_user_data,omitempty"`
|
AdStorage *Consent `json:"ad_storage,omitempty"`
|
||||||
AdPersonalization *Consent `json:"ad_personalization,omitempty"`
|
AdUserData *Consent `json:"ad_user_data,omitempty"`
|
||||||
|
AdPersonalization *Consent `json:"ad_personalization,omitempty"`
|
||||||
|
AnalyticsStorage *Consent `json:"analytics_storage,omitempty"`
|
||||||
|
FunctionalityStorage *Consent `json:"functionality_storage,omitempty"`
|
||||||
|
PersonalizationStorage *Consent `json:"personalization_storage,omitempty"`
|
||||||
|
SecurityStorage *Consent `json:"security_storage,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,8 +50,13 @@ func MPv2MiddlewarConsent(l *zap.Logger) client.MPv2Middleware {
|
|||||||
}
|
}
|
||||||
|
|
||||||
payload.Consent = &mpv2.ConsentData{
|
payload.Consent = &mpv2.ConsentData{
|
||||||
AdUserData: consent(value.Marketing),
|
AdStorage: consent(value.Marketing),
|
||||||
AdPersonalization: consent(value.Statistics),
|
AdUserData: consent(value.Marketing),
|
||||||
|
AdPersonalization: consent(value.Marketing),
|
||||||
|
PersonalizationStorage: consent(value.Marketing),
|
||||||
|
AnalyticsStorage: consent(value.Statistics),
|
||||||
|
FunctionalityStorage: consent(value.Necessary),
|
||||||
|
SecurityStorage: consent(value.Necessary),
|
||||||
}
|
}
|
||||||
spew.Dump(payload)
|
spew.Dump(payload)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user