Adding Custom Columns into the Audit Table Using GDPR Cookie Consent Plugin
The GDPR Cookie Consent plugin allows you to display the cookies entered into the plugin in a tabular form using a shortcode. The table currently displays the cookie title, cookie type, cookie duration and the description of the cookie. The below code snippet allows you to add the cookie ID column to the audit table. Simply add the below code snippet to the active child theme functions.php.
If you need to add both the cookie ID and the cookie sensitivity fields to the table, add the following code to the functions.php.
Comments (4)
Sebastian Bung
December 20, 2019
How to remove a specified column from the audit table? I want to remove the cookie type.
Mark
December 20, 2019
Please refer the article here.
Sebastian Bung
December 20, 2019
Thanks!
Sebastian Bung
December 20, 2019
Figured it out by myself. This code worked for me:
//remove tablehead column 2
jQuery(‘#cliSettingsPopup > div > div > div > div > div > div.cli-col-12.cli-align-items-stretch.cli-px-0.cli-tab-section-container > div > div.cli-tab-content > div > table > thead > tr > th.cookielawinfo-column-2’)
.remove();
//remove row column 2
jQuery(‘#cliSettingsPopup > div > div > div > div > div > div.cli-col-12.cli-align-items-stretch.cli-px-0.cli-tab-section-container > div > div.cli-tab-content > div > table > tbody > tr > td.cookielawinfo-column-2’)
.remove();