Here we show you an example of how you can set up and block a Cookie on your site.
Example - Google Analytics
In order to use Google Analytics with the Borlabs Cookie Plugin, you need your tracking ID. You have to copy this from Google Analytics and enter it into our Cookie Plugin.
Google Analytics may only be integrated via Borlabs Cookie.
Please remove any plugins or JavaScripts that you have used to integrate Google Analytics into your WordPress installation.
This is the only way to ensure that our plugin can block Google Analytics and only execute it with the consent of your visitors.
To set up Google Analytics, first click on the menu item Cookies in the plugin settings.
Here you scroll down to Statistics and click on the Add New button.
In the next step, select Google Analytics as service and click on the Next button.
Now you are in the setup of Google Analytics. Here you can enter various settings and information. For the classic setup, however, we are now concentrating exclusively on the item Additional Settings.
Here you have to paste the previously copied Google Analytics tracking ID. Once you have entered the tracking ID in this field, click on the Save all settings button.
If you use a caching plugin, remember to additionally empty the cache once after saving.
The data obtained by Google Analytics is already automatically anonymized when Borlabs Cookie is used.
Example - Custom Cookie
If you want to set up a Cookie for which there is no template in our plugin, the procedure is similar.
To do this, click on the Add New button.
Now select Custom as service and click on the Next button.
Enter the necessary Cookie Information and then paste the code from your custom Cookie into HTML & JavaScript.
Example - technically necessary Cookie.
Technically necessary Cookies include the WooCommerce cookie, which is necessary for the shopping cart. You do not need the consent of your visitors for such Cookies, but we recommend that you inform them about the Cookies. Technically necessary cookies belong to the Essential Cookies.
To store the information, create a new cookie under Essential. To do this, click the Add New button.
Now select Custom as service and click on the Next button.
Now enter the necessary Cookie Information and save the Cookie.
You do not need to enter any code under HTML & JavaScript. The Cookie is only used to inform your visitors.
Where do I get the JavaScript from?
This question is asked very often and cannot be answered in a general way. Usually, you get the JavaScript from the respective provider, which is inserted into the opt-in code field.
Typical cases, where the provider provides the JavaScript
- Analyse (z. B. hotjar)
- Chat-System (z. B. Userlike, Tidio, tawk.to)
- Marketing (z. B. HubSpot)
- Statistik (z. B. Google Analytics, Facebook Pixel, etracker)
- Werbung (z. B. Google Ads)
If the providers does not provide JavaScript but a WordPress plugin
If the provider does not provide JavaScript or a WordPress plugin is used for a service (e.g. MonsterInsights for Google Analytics), then you have to try to block the JavaScript that is integrated by the plugin with the help of the Script Blocker.
In this case, JavaScript knowledge is mandatory and it is unfortunately technically not possible to provide a manual that works for all plugins. In many cases, however, you can try to transfer the procedure for one plugin to another. For example, the procedure for blocking the JavaScript of MonsterInsights also works for those of Google Analytics for WP.
But there are also cases, e.g. with some Google Map plugins, where the JavaScript cannot be blocked or where the unblocking does not work. In these cases, the service must be abandoned or the plugin must be changed from case to case.