Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Required cookies are cookies that are used by the shop system and without which the shop cannot operate. According to the guideline, no consent is required for these cookies. For this reason, this option cannot be changed by the shop visitor and is already preselected. Below you will find a list of the required cookies that are set by Smartstore.


Cookie name
ASP.NET_SessionIdThis cookie is set by the ASP.NET Framework when a user visits the shop for the first time. It simply stores an ID that is used by ASP.NET to identify a user's session.
SMARTSTORE.AUTHThis cookie is set by the ASP.NET Authentication Framework when a user logs in to the shop. It is used to identify the user who is logged in.
SMARTSTORE.VISITORThis cookie is set by Smartstore the first time a user visits the shop. It is used in order to be able to assign users who are not logged in.
CookieConsent

This cookie is set when a user interacts with the cookie manager. The settings made by the customer are stored here

SmartStore.RecentlyViewedProductsThis cookie stores the product IDs of the products that the customer has viewed recently.
sm.compareProductsThis cookie stores the product IDs of the products that the customer has added to the comparison list.


Analytical cookies

With the help of analytical cookies, statistical web services, such as Google Analytics, collect data on the usage behaviour of a website. These data are used by site operators to improve their own website.

...

Code Block
languagec#
@using SmartStore.Core.Plugins;
@using SmartStore.Services.Customers;
 
@{
    var cm = EngineContext.Current.Resolve<CookieManager>();
    var isMyCookieAllowed = cm.IsCookieAllowed(this.ViewContext, CookieType.Analytics);
}
 
@(isMyCookieAllowed == true)
{
    <script>
        ...
    </script>
}

Scripts

Within scripts you can query the status of the cookie settings made by the customer via the CookieManager object. The two properties AllowsAnalytics and AllowsThirdParty are available here. An initialisation code of a script could then look like this:

Code Block
languagejs
if (CookieManager.AllowsAnalytics) {
	// Initialisierung mit Cookies
} else {
	// Initialisierung ohne Cookies
}


Countries

A cookie hint is only required for countries in the EU, so there is a possibility to turn off the hint at country level. To disable the cookie manager for visitors from a country, go to Admin > Configuration > Regional settings > Countries > Country and uncheck the option Display cookie manager.Cookie Manager