This guide will walk you through how you can generate and add a Cookie Policy page on your Craft CMS website. A Cookie Policy is a document that provides detailed disclosure about the types of cookies used on a website and their purposes. It can help your website meet transparency requirements under privacy laws such as the GDPR and the ePrivacy Directive.
Prerequisites
- A CookieYes account (if you don't have one, sign up for free).
- Admin access to your Craft CMS website.
After you sign up, you will be directed to the installation screens. You can install the cookie banner to support GDPR compliant for your use of cookies. If you prefer to create a cookie policy first, skip the installation and go directly to the CookieYes Dashboard.
Generate a Cookie Policy in CookieYes
Step 1. Access the cookie policy generator
- Log in to your CookieYes account.
- From the top navigation bar, select Legal Policies.
- From the Cookie Policy section, click + Generate.

- Select your primary language. The chosen language will appear with a checkmark.
- (Optional) Enable Generate policy in multiple languages to add more languages. This feature is available on Basic, Pro and Ultimate plans.
- Click Save draft to save your progress or Next to continue.
Step 3. Add about cookies details
In the About cookies section, edit the heading and description to explain what cookies are and why your website uses them. You can keep the default text or edit it to match your website’s practices.
Step 4. Add use of cookies details
In the Use of cookies section, describe how your website uses cookies (for example, functionality, analytics, performance, or advertising). You can keep the default text or update it for accuracy.
When ready, click Preview cookie policy to review the formatting and tone before proceeding.
Step 5. Review and edit types of cookies
In the Types of cookies section, you will see a list of cookies from your most recent website scan. If needed, you can refresh the list by clicking Scan again to capture any new cookies. The cookies are organised into categories such as Necessary, Functional, Analytics, Performance and Advertisement. Review each entry carefully to verify the cookie name, duration, and purpose for accuracy.
Step 6. Set cookie preferences and generate the cookie policy
In the Cookie preferences section, keep the default heading (“Manage cookie preferences”) and description, or update them with instructions specific to your users. Set the Effective Date for the cookie policy. Preview the policy to verify the details and when confirmed, click Generate cookie policy to generate the policy.
The Revisit consent widget enables your website visitors to manage their cookie preferences. You can remove the code in the field if you don’t want a widget to be displayed. For more details, refer to the guide.
Add the Cookie Policy to Craft CMS
After generating your cookie policy, review the preview in your selected language(s). When ready, click Add policy to site in the top-right corner.
A modal window will appear. Follow the below steps to add your cookie policy:
Step 1: Choose your policy installation method
Choose your preferred method for adding the cookie policy to your Craft CMS website:
- Option A: One-click install (Recommended): Add your cookie policy in one click using your cookie banner script. It automatically updates the policy whenever changes are made.
- Option B: Code snippet: Keeps your cookie policy automatically updated.
- Option C: HTML format: Requires manual updates whenever the cookie policy changes.
If you chose Option B or C:
- Select your preferred language.
- Click Copy code.
You can also share the code with a developer or your team by clicking on Send code to a teammate. Enter the email address and then click on Send Instructions. The recipient will get the code and instructions via email.
Note
If you chose Option A (One-click install), there's no code to copy here. Continue to Step 2.
Step 2. Create a cookie policy page in Craft CMS website
1. Log in to your Craft CMS website.
2. Go to Settings > Fields > + New field.
3. In the Create a new field page, complete the following details:
- In the Name field, enter a title for the field, e.g., Body HTML.
- In the Handle field, enter how you refer to the field in templates, e.g., bodyHtml.
- Set the Field Type to Plain Text.
- Click Save to proceed.
4. Navigate to Settings > Sections. Click + New section.
5. In the Create a New Section page, complete the following details:
- In the Name field, enter a title for the section, e.g., Cookie Policy.
- In the Handle field, enter how you refer to the section in templates, e.g., cookiePolicy.
- Set the Section Type to Single.
- Click + Create to add an entry type for this section and provide a name and handle, e.g., Cookie Policy.
- Click Save to proceed.
6. From the Sections list, select the Cookie Policy section to view its entry types, then select the desired Entry Type.
7. Drag the Body HTML field from the available fields list into the Field Layout and click Save.
If you chose Option A (One-click install):
8. Copy the URL of your cookie policy page and paste it into the CookieYes web app.

Step 3. Embed the cookie policy code
- In the Craft CMS dashboard, navigate to Entries. Click the Cookie Policy entry to open its editor.

If you chose Option A — One-click install:
- Paste <div id="cky-auto-cookie-policy"></div> into the Body HTML field and click Save.

- In the Body HTML field, paste the code copied from CookieYes.
- Click Save.

Your cookie policy page will be live on your Craft CMS website. You can then link your cookie policy to your website footer, or link it within your cookie banner.
Conclusion
By following this guide, you can easily generate a cookie policy in CookieYes and publish it on your Craft CMS website. A properly configured cookie policy not only builds trust with your users but also helps your website meet privacy requirements such as the GDPR.
With CookieYes, you have a flexible, compliant and up-to-date solution to manage cookies and privacy transparency on your Craft CMS website.