Terug naar blog
Best Practices

Cookie Consent for Side Projects: The 60-Second Setup

Het GetCookies-teamDecember 30, 20253 min leestijd
Side ProjectIndie HackerQuick StartComplianceVibe Coding

TLDR: Your side project needs cookie consent. Stop procrastinating. Sign up, add domain, paste script, deploy. Total time: 60 seconds. Back to building.

Read full summary

The fastest possible guide to GDPR-compliant cookie consent. No theory. No fluff. Just the exact steps to go from zero to compliant in one minute.

Summary by Claude AI

Stop Reading. Start Doing.

You have 60 seconds.

This isn't a guide about GDPR theory or cookie law nuances. Those articles are endless. You've probably read three already.

This is a step-by-step timer. When you finish reading, you'll be compliant.

Ready?


Seconds 0-20: Sign Up

  1. Open getcookies.co in a new tab
  2. Click "Get Started"
  3. Sign in with Google (one click, no forms)

You now have an account.


Seconds 20-40: Add Your Domain

  1. The dashboard opens automatically
  2. Click "Add Domain"
  3. Type: your-project.com (or whatever your URL is)
  4. Click "Create"
  5. Copy the Domain ID that appears

You now have a Domain ID.


Seconds 40-60: Add the Script

Paste this in your HTML <head>, replacing YOUR_DOMAIN_ID:

<script src="https://getcookies.co/api/v1/widget/loader.js"
        data-domain-id="YOUR_DOMAIN_ID"
        async></script>

Deploy your site.


Second 60: You're Done

Refresh your site. You should see a cookie consent banner.

Congratulations. You're GDPR compliant.


Wait, That's Actually It?

Yes. Here's what that one script tag gave you:

  • Cookie consent banner
  • GDPR compliance
  • CCPA compliance
  • Google Consent Mode v2
  • Script blocking until consent
  • Third-party pixel consent handling
  • Consent logging for audits
  • Preference center for users

All from one <script> tag.


Framework Snippets

Copy the one for your stack:

Next.js

// app/layout.tsx
import Script from 'next/script'

export default function RootLayout({ children }) {
  return (
    <html>
      <head>
        <Script
          src="https://getcookies.co/api/v1/widget/loader.js"
          data-domain-id="YOUR_DOMAIN_ID"
          strategy="afterInteractive"
        />
      </head>
      <body>{children}</body>
    </html>
  )
}

Nuxt 3

// nuxt.config.ts
export default defineNuxtConfig({
  app: {
    head: {
      script: [{
        src: 'https://getcookies.co/api/v1/widget/loader.js',
        'data-domain-id': 'YOUR_DOMAIN_ID',
        async: true
      }]
    }
  }
})

Astro

---
// src/layouts/Layout.astro
---
<html>
  <head>
    <script
      src="https://getcookies.co/api/v1/widget/loader.js"
      data-domain-id="YOUR_DOMAIN_ID"
      async
    ></script>
  </head>
  <body><slot /></body>
</html>

Remix

// app/root.tsx
export default function App() {
  return (
    <html>
      <head>
        <script
          src="https://getcookies.co/api/v1/widget/loader.js"
          data-domain-id="YOUR_DOMAIN_ID"
          async
        />
      </head>
      <body><Outlet /></body>
    </html>
  )
}

SvelteKit

<!-- src/app.html -->
<head>
  <script
    src="https://getcookies.co/api/v1/widget/loader.js"
    data-domain-id="YOUR_DOMAIN_ID"
    async
  ></script>
</head>

Plain HTML

<!DOCTYPE html>
<html>
<head>
  <script src="https://getcookies.co/api/v1/widget/loader.js"
          data-domain-id="YOUR_DOMAIN_ID"
          async></script>
</head>
<body>
  <!-- Your content -->
</body>
</html>

"But I Don't Even Have Analytics Yet"

Add GetCookies anyway.

Here's why: When you eventually add Google Analytics or any tracking, GetCookies will already be blocking it by default. You won't have to retrofit compliance later.

Future you will thank present you.


"My Side Project Gets 12 Visitors a Month"

GDPR doesn't have a traffic threshold.

If you have:

  • Any visitors from the EU (you probably do)
  • Any tracking whatsoever (even Plausible or Simple Analytics)

You need consent.

Our free tier handles small projects. Unlimited page views. No reason not to add it.


"I'll Add It Later"

You won't. Let's look at the excuses:

"I'll add it when I launch" Launch day will have 50 urgent things. Compliance won't make the list.

"I'll add it when I get traffic" By then you're collecting data without consent. You're already non-compliant.

"I'll add it when I have time" You just read this article. That took longer than installing GetCookies.

It takes 60 seconds. Do it now.


The Copy-Paste Cheatsheet

Save this somewhere. Every new project:

<!-- GetCookies Cookie Consent -->
<script src="https://getcookies.co/api/v1/widget/loader.js"
        data-domain-id="REPLACE_ME"
        async></script>

Workflow:

  1. Create domain in GetCookies dashboard
  2. Replace REPLACE_ME with your ID
  3. Paste into <head>
  4. Ship

Optional: Customization

Want to match your brand? Our dashboard offers:

  • Color customization
  • Position options (corner, bottom bar)
  • Custom text
  • Custom CSS

But none of this is required. The default looks good on most sites. You can always tweak later.


Now Get Back to Building

You spent more time reading this than you'll spend implementing.

60 seconds. One script tag. Full compliance.

Your side project deserves better than a GDPR fine.


Ready?

Start your 60 seconds →

Veelgestelde vragen

Does GDPR apply to small side projects?
GDPR doesn't care about traffic. If you have any EU visitors and any tracking (Google Analytics, Plausible, anything), you need consent. GetCookies free tier handles small projects.
Can I add GetCookies before I have analytics?
Yes, add it now. When you add analytics later, GetCookies will already be blocking by default. Your analytics will automatically respect the consent state.
G

Het GetCookies-team

Geschreven en bijgehouden door het GetCookies-team van Getia AS in Oslo, Noorwegen. Dit artikel is algemene informatie over cookietoestemming, geen juridisch advies.

Scan je eigen site gratis

Het gratis plan draait de banner op één site met drie cookiescans per maand. Geen creditcard, geen verkoopgesprek.