---
title: Shop Configuration
description: Configure storefront identity, analytics, and cross-cutting feature availability.
type: reference
---

# Shop Configuration



Edit `lib/config.ts` to set storefront-wide, secret-free options. Keep credentials in environment variables and merchandising data in Shopify.

## Settings

| Setting                               | Default          | Behavior                                                                                        |
| ------------------------------------- | ---------------- | ----------------------------------------------------------------------------------------------- |
| `agent.isEnabled`                     | `false`          | Shows the shopping assistant and enables `POST /api/chat`. The disabled endpoint returns `404`. |
| `analytics.vercel.isEnabled`          | `false`          | Enables Vercel Web Analytics.                                                                   |
| `analytics.speedInsights.isEnabled`   | `false`          | Enables Vercel Speed Insights.                                                                  |
| `analytics.shopify.isEnabled`         | `false`          | Sends storefront page views to Shopify analytics.                                               |
| `analytics.shopify.consentMode`       | `default-banner` | Selects the Shopify consent experience described below.                                         |
| `auth.isEnabled`                      | `false`          | Enables customer authentication.                                                                |
| `botid.isEnabled`                     | `false`          | Protects `POST /api/chat` with [Vercel BotID](https://vercel.com/docs/botid).                   |
| `botid.checkLevel`                    | `basic`          | Selects `basic` or `deepAnalysis` detection.                                                    |
| `pdp.bundles.isEnabled`               | `true`           | Shows product bundle relationships when Shopify provides them.                                  |
| `pdp.buyWithShop.isEnabled`           | `true`           | Shows Buy with Shop.                                                                            |
| `pdp.complementaryProducts.isEnabled` | `true`           | Shows complementary products when Shopify provides them.                                        |
| `pdp.quantityPicker.isEnabled`        | `true`           | Shows the quantity picker.                                                                      |
| `pdp.relatedProducts.isEnabled`       | `true`           | Shows related products when Shopify provides them.                                              |
| `site.name`                           | `"Vercel Shop"`  | Sets the name used in navigation, metadata, structured data, the footer, and the assistant.     |
| `site.url`                            | `defaultUrl`     | Sets the canonical base URL for sitemaps, structured data, and absolute links.                  |
| `webmcp.isEnabled`                    | `false`          | Enables the experimental WebMCP integration in supported browsers.                              |

## Required constraints

Before enabling `auth.isEnabled`, set `CUSTOMER_ACCOUNT_SESSION_SECRET` and `SHOPIFY_CUSTOMER_ACCOUNT_API_CLIENT_ID` as described in [Environment Variables](/docs/reference/env-vars). The build fails if either variable is missing.

Enable `botid.isEnabled` with `agent.isEnabled`. BotID verification runs only on Vercel, so leave it disabled when self-hosting. The `deepAnalysis` level is [billed per check](https://vercel.com/docs/botid#pricing) on Pro plans.

`site.url` resolves from `NEXT_PUBLIC_BASE_URL` or the Vercel production URL. `NEXT_PUBLIC_BASE_URL` must be a bare domain without a protocol, such as `shop.example.com`.

## Shopify consent modes

| Value            | Behavior                                                                                     |
| ---------------- | -------------------------------------------------------------------------------------------- |
| `default-banner` | Uses Shopify's hosted privacy banner where consent is required.                              |
| `custom-banner`  | Uses the storefront's own consent interface.                                                 |
| `no-banner`      | Shows no consent interface. Where consent is required, analytics events cannot be delivered. |

Only expose the public Storefront API token to the browser. Never use a private token for Shopify analytics or consent requests.

## Related configuration

Navigation and footer menus are managed outside `shopConfig`. Use the [`enable-shopify-menus`](/docs/skills/enable-shopify-menus) skill to manage them in Shopify.

WebMCP does not enable Shopify analytics. See [WebMCP](/docs/anatomy/webmcp) for testing instructions.


---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)