Shortcodes used in GDPR Cookie Consent Plugin
Below are all of the shortcodes used in the GDPR Cookie Consent plugin and what they are used for.
Cookie Bar Shortcodes
This shortcode adds an Accept button that is already styled in green color and closes the header when clicked on. The shortcode can be used on the cookie notification bar to take the consent of the user.
You can change the color of the Accept button from the set of pre-defined values for the colour attribute. You can choose from the colours red, blue, yellow, orange, green, or pink. Make sure to use the UK spelling of ‘colour’.
This shortcode adds the Accept button wherever it is applied from the backend of the website. Clicking on the button will register the consent for the usage of the cookies. The button added using this shortcode can be customized with the customization options given in the Accept section of the Customize Buttons tab or from the Themes tab on the Cookie Law Settings page.
This is the cookie settings button rendering shortcode. The Settings button gives the users the granular control over the categories of cookies that they want to give consent to. When the user clicks on the Settings button, the user is shown a popup where they can select which cookie categories that they want to accept.
This shortcode adds the Reject button that can be customized from the Cookie Law Settings page. The reject buttons thus added records the denial of the user to the use of any cookies by the website, when clicked upon.
This shortcode adds a Close button to the Cookie Notice bar. The close action will be treated as the user’s consent. The close button can be further customized from the Themes tab of the Cookie Law Settings page.
|_fbp||0||2 months||This cookie is set by Facebook to deliver advertisement when they are on Facebook or a digital platform powered by Facebook advertising after visiting this website.|
|_ga||0||2 years||This cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, camapign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assigns a randoly generated number to identify unique visitors.|
|_gat_gtag||0||1 minute||Identification code of website for tracking visits.|
|_gh_sess||1||This cookie is used to preserve users states across page requests.|
|_gid||0||1 day||This cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the wbsite is doing. The data collected including the number visitors, the source where they have come from, and the pages viisted in an anonymous form.|
|_hjid||0||11 months||Hotjar cookie. This cookie is set when the customer first lands on a page with the Hotjar script. It is used to persist the random user ID, unique to that site on the browser. This ensures that behavior in subsequent visits to the same site will be attributed to the same user ID.|
|_hjIncludedInSample||0||This cookie is set to let Hotjar know whether that visitor is included in the sample which is used to generate Heatmaps, Funnels, Recordings, etc.|
|fr||1||2 months||The cookie is set by Facebook to show relevant advertisments to the users and measure and improve the advertisements. The cookie also tracks the behavior of the user across the web on sites that have Facebook pixel or Facebook social plugin.|
|has_recent_activity||0||1 hour||This cookie is used to signal to the code repository website if the user has browsed other website resources during the current session.|
|PHPSESSID||0||This cookie is native to PHP applications. The cookie is used to store and identify a users' unique session ID for the purpose of managing user session on the website. The cookie is a session cookies and is deleted when all the browser windows are closed.|
|tk_ai||0||4 years||Gathers information for our own, first party analytics tool about how our services are used. A collection of internal metrics for user activity, used to improve user experience.|
|tk_lr||0||11 months||This cookie is set by JetPack plugin on sites using WooCommerce. This is a referral cookie used for analyzing referrer behavior for Jetpack|
|tk_or||0||4 years||This cookie is set by JetPack plugin on sites using WooCommerce. This is a referral cookie used for analyzing referrer behavior for Jetpack|
|tk_qs||0||30 minutes||Gathers information for our own, first party analytics tool about how our services are used. A collection of internal metrics for user activity, used to improve user experience.|
|tk_r3d||0||3 days||The cookie is installed by JetPack. Used for the internal metrics fo user activities to improve user experience|
The shortcode takes the attributes style with values simple, classic, modern, rounded, elegant, winter. The table by default has the style classic. For example, the shortcode given below will add an audit table that looks as below.
To display a message in the table if there are cookies to display, you can use the attribute not_shown_message. For example:
[cookie_audit style="winter" not_shown_message="No cookies found"]
This shortcode is also used for displaying the cookies that have been added to the plugin in a tabular format but organized into categories. The table will list the cookies according to the categories that they belong to as defined by the user.
This shortcode can be used to list out the cookie list in each category description. For example, if you want to list out the cookies under the analytics category, you may go and edit the Analytics category and insert.
This shortcode can be used to display the popup that appears when the Settings button is clicked, wherever the shortcode is applied.
[delete_cookies] or [delete_cookies text="Click here to delete"]
This shortcode adds a link that when clicked upon deletes all the cookies that are specified in the plugin as a non-necessary cookie.
when the attribute text is used with the shortcode Delete Cookies the link looks as shown below:
[cookie_after_accept]Your Content goes here... [/cookie_after_accept]
Any content that is added in between these enclosing shortcodes will only be displayed if the cookie has been accepted. So this shortcode can be used to restrict any content to the users if they have not accepted the cookies.
[cookie_after_accept category=”category1-slug”]Your content goes here… [/cookie_after_accept]
The category attribute of the shortcode allows restricting the content enclosed based on the category of the cookies specified. More than one categories can be specified and the content will be visible if all the categories of the cookies are enabled. For example, if you specify two categories in the “category” attribute of the shortcode, say Analytics and Marketing, if the user disables the cookies in the Analytics category, the content inside the shortcode will not be made available to the users. It is only when both the categories are enabled, that the users are able to access the content.
[cookie_after_accept category=”category1-slug, category2-slug” condition=”or”]texts[/cookie_after_accept]
The attribute condition with value “or” allows you to display the content specified with the shortcode to be displayed in any of the categories mentioned are enabled. For example, if for there are two categories mentioned in the category attribute Analytics and Marketing, and the user enables any of the categories, the content inside the enclosing shortcodes will be made available to the users.
The Ultimate WordPress Plugin for EU Cookie Law (GDPR) Compliance
Used by 1 Million+ WooCommerce Stores
#1 in Customer Satisfaction
WebToffee Guarantee: Get Your Money Back if You Are Not Satisfied With The ProductBuy Now!