What are Cookies?
Cookies are short text files sent by a visited website to the user's browser, allowing your website or online store to record information about a customer's visit. Every online store, by default, collects essential cookies necessary for its proper functioning, such as saving previous page visits, recognizing logins, and ensuring the shopping cart works.
On This Page
Cookies used by TronShop Platform
In the table below you can find a list of cookies used by TronShop e-commerce platform with their description.
Name | Type | Description |
trackingId | Functional (Mandatory) | It serves to identify users; for instance, each shopping cart is associated with a specific tracking ID, which can be linked to a user who is logged in. Shop cannot work without this cookie. |
AllowedCookies | Functional (Mandatory) | This cookie stores the user's consent status for cookies, recorded once they approve cookie use via the cookie bar. |
.AspNetCore.Antiforgery.XXX | Functional (Mandatory) | The AspNetCore.Antiforgery cookie is a part of ASP.NET Core's security mechanisms to prevent Cross-Site Request Forgery (CSRF/XSRF) attacks. This cookie is essential for maintaining the security of web applications, ensuring that each request sent to the server is from the authenticated user and not from an unauthorized source trying to exploit the user's authenticated session. |
.AspNet.Consent | Functional (Mandatory) | The .AspNet.Consent cookie is part of ASP.NET Core's implementation for managing user consent under privacy regulations like the General Data Protection Regulation (GDPR). It is used to record whether a user has given consent for cookies to be used on the site. |
Cookiebar and Cookies consent
In the TronShop platform there is a built-in cookiebar feature you can use for cookie consent management. This feature can be enabled/disabled in TronShop administration in Settings > Visual Settings > Footer and here you can find “Show cookies GDPR stripe”. Cookiebar is shown in the bottom section of any page on your shop until it’s accepted by the user or after previous consent expires (the expiration is 2 years). In the cookiebar you can find 4 checkboxes - *Functional, Marketing, Performance, Analytics. If you don't have any external scripts in your shop, this does nothing by itself. But these types are exactly the same types you can find in the external scripts editor in TronShop Admin and a visitor of your shop can control which external scripts will be running (Placed into the page when the page it’s rendered).
PLEASE TAKE ATTENTION
If you are implementing some script in your shop, pay extra attention to its “Script Cookie Tag”. If you mark a script as a “Marketing” by script cookie tag, this script will work only when a visitor of your shop allows “Marketing” or All (Marketing also) cookies in the cookiebar.
More information about external scripts can be found here.
Newly added “Decline All” button
This button declines all cookies except those that functional
Working with Cookie Consent in TronShop Platform
As described above, there is a special cookie called “AllowedCookies” which stores the user's cookie consent status, recorded once they approve/reject cookie use via the cookie bar. The value of this cookie is a list of allowed cookie types separated by “|”. You can use this cookie and its value in JavaScript code in external scripts for example in Google Analytics/Google Tag manager in a connection with Google Consent Mode.
Working with Allowed Cookies in JavaScript
To get a list (array) of allowed cookies in JavaScript you can use our pre-prepared function “getAllowedCookies()”. You can use this function for instance in external scripts.
Get Allowed Cookies in ExternalScripts by placeholders
There is another approach to get information about allowed cookies. This can be done by using specific placeholders in External Scripts - see a table below. There are three placeholders, each for each type (“Marketing”, “Tracking”, “Performance”), note that “Functional” are always enabled, so there is no placeholder for this type. Note, that those placeholders are replaced when rendering the whole page processed by backend code (Server-side rendered).
Type | Placeholder | Possible Values |
Marketing | {{ALLOWED_COOKIES_MARKETING}} | 1, 0 |
Tracking | {{ALLOWED_COOKIES_TRACKING}} | 1, 0 |
Performance | {{ALLOWED_COOKIES_PERFORMANCE}} | 1, 0 |
TIP
For specific code examples and detailed setup for Google Analytics into TronShop, please, continue to the section below:
Comments
0 comments
Please sign in to leave a comment.