builder.Services.AddCookieConsent(o =>
{
o.Revision = 1;
o.PolicyUrl = "/cookie-policy";
o.ConsentModalPosition = ConsentModalPosition.BottomRight;
o.ConsentModalLayout = ConsentModalLayout.Cloud;
o.ConsentSecondaryActionOpensSettings = true;
o.Categories.Add(new CookieCategory
{
TitleText = new()
{
["en"] = "Google Services",
["de"] = "Google Dienste"
},
DescriptionText = new()
{
["en"] = "Allows the integration and usage of Google services.",
["de"] = "Erlaubt die Verwendung von Google Diensten."
},
Identifier = "google",
IsPreselected = true,
Services = new()
{
new CookieCategoryService
{
Identifier = "google-maps",
PolicyUrl = "https://policies.google.com/privacy",
TitleText = new()
{
["en"] = "Google Maps",
["de"] = "Google Maps"
},
ShowPolicyText = new()
{
["en"] = "Display policies",
["de"] = "Richtlinien anzeigen"
}
},
new CookieCategoryService
{
Identifier = "google-places",
PolicyUrl = "https://policies.google.com/privacy",
TitleText = new()
{
["en"] = "Google Places",
["de"] = "Google Places"
},
ShowPolicyText = new()
{
["en"] = "Display policies",
["de"] = "Richtlinien anzeigen"
}
},
new CookieCategoryService
{
Identifier = "google-analytics",
PolicyUrl = "https://policies.google.com/privacy",
TitleText = new()
{
["en"] = "Google Analytics",
["de"] = "Google Analytics"
},
ShowPolicyText = new()
{
["en"] = "Display policies",
["de"] = "Richtlinien anzeigen"
}
}
}
});
});