Prompt

How do I store consent timestamps and versions for audits?

Technology / Marketing Automation1 observationLast seen Oct 29, 2026

Latest observation

Oct 29, 2026OpenAI APIWeb search: off

For auditability, store consent as an event record rather than just a yes/no flag.

What to store

At minimum, capture:

  • User/subject ID
  • Consent type/purpose
    e.g. marketing emails, data sharing, analytics
  • Consent status
    granted / withdrawn / denied
  • Timestamp of the event
  • Consent version
    version of the policy/text the user saw and agreed to
  • Source/channel
    web, mobile app, email, paper form, call center
  • Locale/language shown to the user
  • Proof metadata
    IP address, user agent, device ID, form/page ID, or document ID
  • Actor
    the user, admin, or system action that recorded it
  • Revocation timestamp and reason, if withdrawn

Recommended data model

Use an append-only table like:

consent_events (
  id                UUID PRIMARY KEY,
  user_id           UUID NOT NULL,
  consent_type      VARCHAR(100) NOT NULL,
  status            VARCHAR(20) NOT NULL,   -- granted, withdrawn, denied
  consent_version   VARCHAR(50) NOT NULL,
  occurred_at       TIMESTAMP WITH TIME ZONE NOT NULL,
  source            VARCHAR(50),
  language_code     VARCHAR(10),
  ip_address        INET,
  user_agent        TEXT,
  document_hash     TEXT,
  recorded_by       UUID,
  created_at        TIMESTAMP WITH TIME ZONE DEFAULT now()
)

Then you can derive the current state from the latest event per consent type.

Best practices

  • Never overwrite old consent records; append new events instead.
  • Version the consent text itself, and store the version or hash the user accepted.
  • Keep immutable audit logs separate from business-state tables.
  • Record withdrawals as explicit events, not deletions.
  • Link to the exact text displayed (URL, document ID, or content hash).
  • Use UTC timestamps with timezone info.
  • Protect integrity with restricted access, write-once storage, or signing/hashing if needed.

Example audit trail

  1. 2026-01-10T14:22:31Z — granted marketing consent, version v3, web, IP 203.0.113.10
  2. 2026-03-02T09:11:05Z — withdrawn marketing consent, version v3, mobile app

If you want stronger audit evidence

Consider storing:

  • a SHA-256 hash of the consent text
  • a PDF snapshot of the form or policy
  • a digital signature or tamper-evident log entry

If you want, I can give you:

  1. a PostgreSQL schema,
  2. an event-sourcing design, or
  3. a GDPR/CCPA-oriented consent audit checklist.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.