> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiveku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Site Enhancements

> Add cookie consent banners, security headers, PWA support, and SEO metadata with one click

Hiveku's Site Enhancements are toggle-on features that handle the boilerplate every modern site needs — analytics, SEO metadata, security headers, PWA support, and more.

```
Project > Hosting > scroll to "Enhancements"
```

Each enhancement can be toggled independently per environment (staging vs. production), so you can test changes in staging before shipping.

## Available Enhancements

| Enhancement              | What it adds                                                             |
| ------------------------ | ------------------------------------------------------------------------ |
| **Visitor Analytics**    | Page view, session, and referrer tracking. Privacy-friendly, no cookies. |
| **Cookie Consent**       | GDPR/CCPA-compliant consent banner with category toggles                 |
| **Security Headers**     | CSP, X-Frame-Options, HSTS, referrer-policy, permissions-policy          |
| **SEO Enhancements**     | Auto Open Graph, Twitter Card, and JSON-LD structured data               |
| **PWA Ready**            | `manifest.json`, service worker, offline fallback, Add to Home Screen    |
| **Accessibility**        | Skip links, ARIA landmarks, visible focus styles                         |
| **Made in Hiveku Badge** | Small opt-out badge in a corner of your site (hide on paid plans)        |

## How to Enable

<Steps>
  <Step title="Open Hosting">
    From your project, click **Hosting** in the sidebar.
  </Step>

  <Step title="Scroll to Enhancements">
    You'll see a grid of toggles, one per enhancement, with a short description under each.
  </Step>

  <Step title="Pick the environment">
    The page has two columns — **Staging** and **Production**. Toggle enhancements independently in each.
  </Step>

  <Step title="Flip the toggle">
    Your choice saves immediately. Some enhancements open a config drawer — cookie banner copy, PWA icon upload, analytics settings.
  </Step>

  <Step title="Deploy">
    Toggles persist, but your live site won't reflect them until the next deploy. Click **Deploy** in the top bar.
  </Step>
</Steps>

## Per-Enhancement Notes

### Visitor Analytics

No cookies, no fingerprinting. Tracks pageviews, sessions, referrers, and basic device info. Data appears in **Analytics** in the sidebar. Good for compliance-sensitive sites.

### Cookie Consent

Shows a banner on first visit with categories (necessary, analytics, marketing). Stores the choice in localStorage. If you use third-party marketing pixels, wrap them in a category check so they respect the consent state.

### Security Headers

Adds hardened HTTP headers:

* **Content-Security-Policy (CSP)** — blocks unexpected scripts and iframes
* **X-Frame-Options** — prevents clickjacking
* **Strict-Transport-Security (HSTS)** — forces HTTPS
* **Referrer-Policy** — controls what referrer info leaks
* **Permissions-Policy** — locks down browser features (camera, mic, geolocation)

<Warning>
  Security Headers can break embeds that aren't on your allow-list — Stripe checkout, YouTube, Calendly, third-party widgets. Enable in **staging** first and check every embedded widget works before flipping on production. If something breaks, add the domain to the CSP allow-list in the enhancement's config drawer.
</Warning>

### SEO Enhancements

Automatically injects per-page:

* Open Graph tags (`og:title`, `og:description`, `og:image`)
* Twitter Card metadata
* JSON-LD structured data (Article, Product, Organization depending on page type)

Page titles and descriptions come from each page's Meta settings (see [Manage Website Pages](/how-tos/manage-pages)).

### PWA Ready

Generates `manifest.json`, registers a service worker, provides an offline fallback, and enables Add to Home Screen on mobile. Upload a 512x512 icon in the config drawer.

<Info>
  PWA needs HTTPS to install. Custom domains with Hiveku's auto-SSL or the default `.hiveku.com` subdomain both work automatically.
</Info>

### Accessibility

Adds:

* Skip-to-content links at the top of every page
* ARIA landmarks (`<main>`, `<nav>`, `<header>`, `<footer>` roles)
* Visible focus styles for keyboard navigation

No visual change for most users — only improves screen reader and keyboard experience.

### Made in Hiveku Badge

A small "Made with Hiveku" chip in a corner of your site. On free plans it's on by default and can't be removed. On paid plans you can toggle it off.

If kept on, pick the position — **left**, **right**, or **bottom**.

## Verifying Enhancements Are Live

After deploying, verify via browser dev tools:

<Steps>
  <Step title="Check response headers">
    Open dev tools (F12) > Network > click the main document. Look at the **Response Headers** section. You should see `content-security-policy`, `strict-transport-security`, etc. if Security Headers is enabled.
  </Step>

  <Step title="Check page source">
    Right-click > View Page Source. Look for Open Graph meta tags if SEO is enabled, `<link rel="manifest">` if PWA is enabled.
  </Step>

  <Step title="Check the cookie banner">
    Open in incognito — the banner should appear on first visit.
  </Step>

  <Step title="Check analytics">
    Visit a page, then open Analytics in Hiveku — the pageview should register within a few minutes.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Enhancement toggled on but nothing on the live site">
    Did you deploy? Toggles persist between deploys, but changes only apply after the next build. Click **Deploy**.
  </Accordion>

  <Accordion title="Stripe, YouTube, or Calendly embeds broke after enabling Security Headers">
    The default Content-Security-Policy doesn't allow all third-party domains. Open the Security Headers config and add the domains to the CSP allow-list. Common additions: `js.stripe.com`, `www.youtube.com`, `calendly.com`.
  </Accordion>

  <Accordion title="Cookie banner text is in English but I need another language">
    Open the Cookie Consent config drawer and customize the banner copy. Multi-language support is per-locale — add your translation strings under the language code.
  </Accordion>

  <Accordion title="PWA isn't installable on mobile">
    PWA requires HTTPS and a registered service worker, both of which Hiveku handles automatically. Check: the site loads over HTTPS (not HTTP), and you've uploaded a 512x512 icon in the PWA config. On iOS, Add to Home Screen works slightly differently — user has to tap Share > Add to Home Screen.
  </Accordion>

  <Accordion title="SEO tags missing on specific pages">
    Make sure each page has a Meta Title and Description set (**Content > Pages > click a page > Meta**). The SEO enhancement uses those values to build the tags.
  </Accordion>
</AccordionGroup>

## What's Next?

<CardGroup cols={2}>
  <Card title="SEO Setup" icon="magnifying-glass" href="/how-tos/seo">
    Go deeper on meta, sitemaps, and search console
  </Card>

  <Card title="Custom Domain" icon="globe" href="/how-tos/custom-domain">
    Point your domain at the site
  </Card>
</CardGroup>
