💡

Key Points

Key Takeaways

  • 1

    Cookies are like membership cards for websites

  • 2

    Laws (GDPR/APPI) require prior consent for tracking

  • 3

    Google Consent Mode v2 allows acquiring statistical data while protecting privacy

  • 4

    This blog operates with a Default Deny safety design

Have you noticed a small banner popping up in the bottom left of this blog (Gadget Lab Blog) recently?

It”s that thing asking “Do you consent to the use of cookies?”. People often think “It”s annoying” or “I”ll just accept it”, but actually, this is a very important shield to protect internet privacy.

This time, I will explain without technical jargon what cookies are in the first place , “and how the latest mechanism “Google Consent Mode v2” introduced in this blog achieves both “Privacy” and “Site Operation”.

🍪 Are Cookies something used for eating?

Let”s start from the basics. “Cookies” in websites are “small memo pads saved in the browser” .

User
So it's not a sweet cookie?
User
Yes (lol). It helps to imagine a 'membership card' or 'cloakroom ticket' handed by the website to the visitor.

Good Points and Scary Points of Cookies

There are two types of cookies: “Convenient usage” and “Slightly scary usage”.

  1. Necessary Cookies (Membership Card)
  • Maintain login status.
  • Remember contents of shopping cart.
  • Without this, you would be logged out every time you move pages.
  1. Analysis/Advertising Cookies (Tracker)
  • Record “This person saw article A yesterday and bought product B today”.
  • Track behavior across websites and show advertisements perfect for you.

The usage viewed as problematic is the latter “Tracker” type cookies. It’s not a pleasant feeling to have your behavioral history recorded in detail without knowing and passed to advertising companies… is it?

Privacy protection rules have become stricter worldwide, such as Europe’s “GDPR” and Japan’s “Amended Act on the Protection of Personal Information (APPI)”.

“You must not save tracking cookies without user permission”

This is the current global standard. Therefore, site operators are obligated to ask “May I track you?” upon visiting and stop all tracking functions until “Sure (Consent)” is said .

⚠️
'Implied Consent' is NG

Banners saying “Continuing to use the site constitutes consent” existed in the past, but now it is strictly required to keep the state at zero cookies until the user actively presses the “Accept” button .

However, “if everyone chooses “Deny”, site operators will be in trouble. They will not be able to get even statistical data that does not identify individuals , such as “How many people came today” or “Which article is popular”. Blog improvements cannot be made.

Therefore, “this blog introduced “Google Consent Mode v2” .

Even if “Denied”, AI compensates

Consent Mode v2 is a smart mechanism that fills data gaps while respecting user privacy.

  1. If you choose “Deny”
  • Personal identification ID (Cookie) is not issued at all .
  • Instead, only an anonymous, one-time signal (Ping) like “There was access on iPhone at 10 o”clock” is sent to Google.
  • This signal does not contain information that can identify individuals.
  1. Google AI “Modeling”
  • By combining data from users who consented and anonymous Pings, it statistically estimates (models) “There must have been about this much access overall”.

With this, a Win-Win relationship is created where your privacy is 100% protected while the blog operator can grasp overall trends .

User
So, even if I deny, 'who' came is not revealed, but it is conveyed that 'someone' came.
User
Exactly! Imagine casting one vote for article popularity while protecting personal information.

⚙️ Technical Commitment (Lightweight & Safe)

In this blog’s implementation, we use a very lightweight library called vanilla-cookieconsent . Unlike heavy tools used on many sites, it hardly slows down page display speed.

Also, the setting is “Default Deny” . Unless you press the “Accept” button, “Google Analytics scripts run in restricted mode and individual tracking is not performed.

If you think “I want to change settings after all”, you can change it anytime from the “Privacy Policy” link at the bottom of the site or “Cookie Settings” in the corner of the screen.

When handling consent state on the frontend, combining TypeScript and Zod allows you to prevent invalid states (bugs) before they happen.

import { z } from "zod";
import SummarySlides from "@/components/ui/SummarySlides";

const ConsentSchema = z.object({
  ad_storage: z.enum(["granted", "denied"]),
  analytics_storage: z.enum(["granted", "denied"]),
  personalization_storage: z.enum(["granted", "denied"]),
  timestamp: z.string().datetime(),
});

type Consent = z.infer<typeof ConsentSchema>;

This ensures that the flags passed to AI data modeling (Consent Mode v2) are always in the correct format.

Summary: To Read with Peace of Mind

In this blog, we incorporate the latest privacy protection technologies unseen to ensure everyone can enjoy gadget information and technical articles with peace of mind.

Although the banner pops up and takes a moment of your time, if you “Accept” , accurate access analysis can be done leading to article quality improvement. Of course, there is no problem with viewing even if you “Deny” .

We will continue transparent blog operation, so thank you for your support of Gadget Lab Blog!