Implementing CookieYes on WordPress
Last updated on January 2nd, 2020.
CookieYes helps in creating a cookie consent banner and manage the user consent for websites. You can easily install the cookie banner on your website. For this, you need to add the CookieYes installation code in the source code of your website.
This article will help you implement the CookieYes code on your WordPress website.
Copy Installation Code
Copy the installation code that will be available to you when you sign up for a CookieYes account. If you haven't copied the code while registration, you can also get the code from the CookieYes dashboard. To copy the code from the dashboard, go to the Settings page, and click on the Get Script button for the next to the website that you want the code for. You will be shown a popup window with the installation code that you can copy.
Add Code to Site
To install the CookieYes code you need to head over to your WordPress dashboard. There are two ways for installing this on your WordPress website.
- Add code by editing your theme directly
- Add code using a plugin
You can add the code via the theme of your WordPress website. Go to Appearance >Theme Editor from your WordPress dashboard.
In the theme editor, go to Theme Header or Footer and paste the code between the <head> </head> tags of your website prior to all other scripts.
Update file and you can see the banner displayed on your website.
Using a Plugin
Another method is to search for a plugin to edit your Wordpress website and insert the installation code, without editing the theme. This method is recommended over the first one as in the case when the theme is updated, the changes will be overwritten.
For example, the plugin Insert Headers and Footers can be used. This plugin will help you insert a code into your Wordpress website header or footer.
Note: Insert Headers and Footers plugin is an example of the plugins that can be used for inserting code in this way. It’s not a recommendation, you can use a plugin of your choice.
Download and install the plugin on your website. Once installed and activated, you will see an option to configure the plugin.
When you click on it, you will be redirected to the settings page of Insert Headers and Footers. Here you can enter scripts or code in Header or Footer and save the changes.
Once you have completed the steps you can see the banner appear on your website.
Further CookieYes Configuration
After the banner is displayed on the website, the job is half done. Your users are now aware of the cookies being used on your website. Next step is to configure CookieYes so that the user consent is recorded and cookies are only installed from the website after the users have given consent to it.
You can read more about the configuring CookieYes from the setup guide.
In case of any issue in the set up of CookieYes, please contact our support team through our contact page.