add-analytics-and-privacy-policy
Adds privacy-friendly visitor analytics and a plain-English privacy page covering contact-form data, analytics and overseas providers, with Australian Privacy Principles notes. Not legal advice. Use when the user wants site analytics, visitor stats, a privacy policy or privacy page.
Version 1.0 · Updated 2026-10-31
Install in Claude Code, Cursor or Codex (optional)
Only for AI coding tools that read skill folders. Run one line in a terminal, in your project folder. It downloads this skill's text files from TheSkillVault and nothing else; you can read them first with “View raw SKILL.md”.
Claude Code (all your projects)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-analytics-and-privacy-policy/raw' -o ~/'.claude/skills/add-analytics-and-privacy-policy/SKILL.md'Cursor (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-analytics-and-privacy-policy/raw' -o '.cursor/skills/add-analytics-and-privacy-policy/SKILL.md'Codex and other Agent Skills tools (this project)
curl -fsSL --create-dirs 'https://theskillvault.ai/api/skills/add-analytics-and-privacy-policy/raw' -o '.agents/skills/add-analytics-and-privacy-policy/SKILL.md'
Or connect the whole library over MCP
Add TheSkillVault to Cursor or add this to your app's MCP settings (read-only; help):
{
"mcpServers": {
"theskillvault": {
"url": "https://theskillvault.ai/mcp"
}
}
}Add analytics and a privacy page
> Not legal advice. This skill helps you write a clear first draft and points to the official guidance. Facts were checked against oaic.gov.au and vercel.com on 2026-10-31. Laws and guidance change: check the linked pages, and ask a lawyer if you handle health, financial or children's information or are unsure whether the Privacy Act covers you.
When to use
- A website collects anything about visitors (a contact form, analytics, a newsletter) and needs a privacy page.
- You want simple visitor numbers without building a tracking setup.
- Australian small businesses especially; the structure works elsewhere but the legal notes are Australian.
Handoff
- Reads:
docs/website-brief.md(business name and contact details),app/contact/actions.ts(what the form collects and where it sends it), and the list of services the site uses. - Writes:
app/privacy/page.tsx, the analytics component inapp/layout.tsx, and a footer link to/privacy.
Steps
- List what the site actually collects and who receives it, in a table in your notes: contact form (name, email, message → the email provider and the owner's inbox), analytics (page views, referrer, rough location, device → the analytics provider), hosting logs (→ the host). Don't guess: read the code.
- Analytics, choose one:
- Vercel Web Analytics if the site is on Vercel: enable it in the project's Analytics tab,
npm install @vercel/analytics, add<Analytics />from@vercel/analytics/nextinapp/layout.tsx. Vercel's docs say it uses no third-party cookies, identifies visitors by a hash of the request that is discarded after 24 hours, and stores page URL, referrer, coarse location, OS, browser and device type. - Another privacy-focused tool: only describe it as "cookie-free" if that vendor's own documentation says so, and record the link.
- Don't put personal details (emails, names, order numbers) into URLs or custom events.
- Check whether the Privacy Act covers the business (OAIC small-business page):
- Most businesses with annual turnover of A$3 million or less are not covered.
- Some are covered regardless of turnover, including health service providers (which OAIC says includes complementary therapists, child care centres and private schools), businesses that trade in personal information, Commonwealth contracted service providers, businesses related to a covered business, and businesses that have opted in. Use OAIC's checklist on that page.
- Even if not covered, a short honest privacy page is good practice and builds trust; OAIC recommends protecting the personal information you hold.
- Write
app/privacy/page.tsxin plain English with these headings. They follow what APP 1.4 requires a privacy policy to contain:
- Who we are and how to contact us (business name, email, phone).
- What we collect and how (the table from step 1, in sentences).
- Why we collect it and how we use and share it (reply to enquiries; understand which pages are useful).
- Overseas providers: name the services and, where practicable, the countries they are likely to store data in (check each provider's privacy page; many are in the United States).
- How to see or correct your information (APP 12 and 13): email us; we'll respond within a reasonable time.
- How to complain: contact us first; if you're not satisfied you can complain to the OAIC (oaic.gov.au).
- How long we keep enquiries, and how we keep them secure.
- Date last updated.
- Collection notice at the form (APP 5): one sentence under the contact form saying who you are, why you collect the details, and linking to
/privacy. The contact form step adds this line; check it matches the page. - Link
/privacyfrom the footer of every page, and add it toapp/sitemap.ts. - Re-read the page against what the code does. If you add a service later (chat widget, booking tool, newsletter), update the table, the page and its date.
Gotchas
- Only say what is true. A privacy page promising "we never share data" while using a US email API is wrong.
- A mailing list is different from a contact form. Don't add enquirers to marketing emails without their consent; the Spam Act 2003 (regulated by ACMA) applies to marketing emails, and APP 7 notes the overlap.
- From 10 December 2026, APP 1.7–1.9 require covered businesses whose computer programs make, or substantially and directly help make, decisions that could significantly affect someone's rights or interests to describe this in their privacy policy. OAIC lists this as starting on that date; it is not in force at the time of this check, and a brochure site with a contact form and analytics normally makes no such decisions.
- Don't copy another company's privacy policy: it describes their systems, not yours.
- Analytics tools change their data handling; re-check the vendor's privacy docs when you set it up.
Sources (checked 2026-10-31)
- OAIC, Small business: https://www.oaic.gov.au/privacy/privacy-guidance-for-organisations-and-government-agencies/organisations/small-business
- OAIC, Read the Australian Privacy Principles (APP 1, 5, 7, 8, 12, 13): https://www.oaic.gov.au/privacy/australian-privacy-principles/read-the-australian-privacy-principles
- OAIC, APP 1 guidelines (APP 1.7–1.9 from 10 December 2026): https://www.oaic.gov.au/privacy/australian-privacy-principles/australian-privacy-principles-guidelines/chapter-1-app-1-open-and-transparent-management-of-personal-information
- OAIC, Privacy complaints: https://www.oaic.gov.au/privacy/privacy-complaints
- Vercel, Web Analytics privacy and compliance: https://vercel.com/docs/analytics/privacy-policy
Example prompt
"Add a privacy policy page to my site and some simple visitor stats. I'm a small Australian business with a contact form."
Licence: CC BY 4.0. Attribution when you reuse it: From TheSkillVault, https://theskillvault.ai, CC BY 4.0