Cookie Consent Storing

  • Navigate to Cloudflare’s official website by clicking on the following link: https://www.cloudflare.com/

  • If you already have a Cloudflare account, simply log in.

  • If you don't have an account, click on "Start for Free" as shown in the image below to create a new account.

  • You can easily sign up for a Cloudflare account using your Google or Apple account for a faster registration process.

  • After a successful login, you will be redirected to the Cloudflare dashboard. In the left sidebar menu, find Compute (Workers), click on it to expand the options, and then select Workers & Pages.

  • Then, click "Create" to add a new worker.

  • You will be redirected to the Create an Application page. Under the Workers tab, click on Quick Start, as shown in the image below.

  • Give your worker a name and click Deploy. In our example, we have named the worker cookie-consent-flowappz.

  • You will be redirected to the Success page. Click Edit Code to proceed.

  • Then, paste the following code into the code editor and click Deploy.

  • Then, go back to the Dashboard, and in the left-side menu under Storage and Databases, click on KV.

  • Then, click on Create.

  • Give a name to the Namespace and click Add. In our example, we have used the name Cookie Consent KV.

  • Go to Workers and Pages, then click on the previously created worker. In our example, it is cookie-consent-flowappz.

  • Navigate to the Settings tab and click on Variables & Secrets in the left-side menu.

  • Under the Bindings section, click on Add.

  • Then, select the KV Namespace.

  • Enter the variable name as CONSENTS and select the KV namespace as Cookie Consent KV. After that, click Deploy.

  • Right-click on the icon shown in the image and copy the URL.

  • Open your cookie consent app in the designer. Navigate to the Settings tab, paste the URL into the Consent Storing Endpoint input field, and then click Save Settings.

  • To view all stored consents, navigate to KV under Storage and Databases, then click on Cookie Consent KV.

  • Then, navigate to the KV Pairs section, where you will see all the users' consents.

Last updated

Was this helpful?