Developer forum

Forum » CMS - Standard features » CookieManager - how do i list Secure cookies and Tracking cookies

CookieManager - how do i list Secure cookies and Tracking cookies

Thomas Jensen
Reply

Hi

In Cookie Manager, I can make custom Cookies categories and with API I can list them using CookieManager.GetCategories()
and inturn also list cookies selected/added in those categories CookieManager.GetCategoryCookies( [Cookies categorie] )

eg. CookieManager.GetCategoryCookies("Marketing") will list the cookies selected/added in the custom categori named Marketing

But that only works for custom categories

How do i list the cookies selected/added under "Secure cookies" and "Tracking" (the 2 default categories) ?

 

/Thomas


Replies

 
Nicolai Pedersen
Reply

Hi Thomas

You cannot I am affraid. The only option is to get the cookie names from global settings:

Dynamicweb.Configuration.SystemConfiguration.Instance.GetValue(“/Globalsettings/Settings/CookieManager/TrackingCookies”)

Dynamicweb.Configuration.SystemConfiguration.Instance.GetValue(“/Globalsettings/Settings/CookieManager/SecureCookies”)

Sorry about the inconvenience!

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have another question that's related to this subject.

Assuming I have created a few Cookie categories and I want to allow the user to select the cookies that are allowed.

How do I integrate the categories of cookies in the Cookie Message panel and the CookieManager.SetCookieOptInLevel ?

Thank you,

Adrian

 
Nicolai Pedersen
Reply

You do that by code. See the cookiemanager here: https://doc.dynamicweb.com/api/html/aa3aed73-f446-7ce0-aca0-2046b4547f11.htm

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you.
Any sample code I can use?

Thank you,

Adrian

 
Nicolai Pedersen
Reply

I am sorry, no.

 

You must be logged in to post in the forum