โœจ Wix UCP Implementation Guide

Make your Wix eCommerce store AI-ready. Enable ChatGPT, Google AI Mode, and AI shopping agents to discover and shop your products.

๐Ÿค– AI Agent Ready โšก Easy Setup ๐Ÿ”ง Velo Code ๐Ÿ”’ Secure

Why Add UCP to Wix?

Wix powers millions of online stores worldwide. Adding UCP (Universal Commerce Protocol) support makes your Wix store discoverable by AI shopping assistants, enabling automatic product discovery and purchases.

  • Visual Editor: Add UCP without deep technical knowledge
  • Velo by Wix: Use Wix's development platform for custom implementations
  • Built-in Hosting: No server configuration needed
  • Wix Stores Integration: Works seamlessly with Wix eCommerce
๐Ÿ“ฆ Wix Plans UCP implementation requires a Wix premium plan with eCommerce features. The Velo method requires a plan that supports custom code.

Implementation Methods

Method Difficulty Requirements
Wix App (Recommended) Easy Any Wix eCommerce plan
Velo Backend Medium Velo-enabled plan
External Hosting Medium Domain with redirect capability

Method 1: Velo Backend (Recommended)

Use Wix Velo to create a backend HTTP function that serves your UCP profile.

1Generate Your UCP Profile

Generate Your UCP Profile

Create a customized UCP profile for your Wix store.

Open Generator โ†’
2Enable Dev Mode
  1. Open your Wix site in the Editor
  2. Click Dev Mode in the top menu
  3. Click Turn on Dev Mode
3Create HTTP Function
  1. In the Site Structure panel, expand Backend
  2. Create a new file: http-functions.js
  3. Add the following code:
// Backend/http-functions.js
import { ok, serverError } from 'wix-http-functions';

// This creates the endpoint: /_functions/ucp
export function get_ucp(request) {
    const profile = {
        profile_version: "1.0",
        merchant: {
            name: "Your Store Name",
            url: "https://www.yoursite.com",
            description: "Your store description",
            contact: {
                email: "support@yourstore.com"
            }
        },
        capabilities: ["browse", "search"],
        policies: {
            returns_url: "https://www.yoursite.com/returns-policy",
            shipping_url: "https://www.yoursite.com/shipping-policy",
            privacy_url: "https://www.yoursite.com/privacy-policy"
        }
    };

    const options = {
        headers: {
            "Content-Type": "application/json",
            "Access-Control-Allow-Origin": "*"
        },
        body: JSON.stringify(profile, null, 2)
    };

    return ok(options);
}
4Create Router for .well-known

Create a new file routers.js in the Backend folder:

// Backend/routers.js
import { ok, WixRouterSitemapEntry } from 'wix-router';

export function wellknown_Router(request) {
    if (request.path[0] === 'ucp') {
        // Redirect to HTTP function
        return ok('ucp-page', {});
    }
}
5Add Router Prefix
  1. In the Wix Editor, go to Site Menu โ†’ Add Page
  2. Choose Router Page
  3. Set prefix to .well-known
  4. Connect it to your router
โš ๏ธ Wix Router Limitations Wix routers may have limitations with .well-known paths. If you encounter issues, use the External Hosting method below.
6Publish Your Site

Click Publish to make your changes live. Your UCP profile will be available at:

  • https://yoursite.com/_functions/ucp (HTTP function)
  • https://yoursite.com/.well-known/ucp (if router works)

Method 2: External Hosting with Redirect

If Velo isn't available or the router doesn't work, host your UCP profile externally and redirect.

1Host Your UCP Profile

Upload your UCP JSON file to a service like:

2Set Up Domain Redirect

If you're using a custom domain with Wix, you can set up a redirect at the DNS level or use Cloudflare Workers:

// Cloudflare Worker example
addEventListener('fetch', event => {
    event.respondWith(handleRequest(event.request))
})

async function handleRequest(request) {
    const url = new URL(request.url)
    
    if (url.pathname === '/.well-known/ucp') {
        const ucpUrl = 'https://your-hosted-ucp-url.com/ucp.json'
        const response = await fetch(ucpUrl)
        return new Response(response.body, {
            headers: {
                'Content-Type': 'application/json',
                'Access-Control-Allow-Origin': '*'
            }
        })
    }
    
    return fetch(request)
}

Schema.org Markup

Wix Stores automatically adds basic Schema.org markup to product pages. For enhanced AI compatibility:

  1. Go to your site's SEO Settings
  2. Navigate to SEO Tools โ†’ Structured Data
  3. Ensure Product schema is enabled
๐Ÿ’ก Verification Use Google's Rich Results Test to verify your product pages have proper structured data.

Validate Your Implementation

Validate Your Wix Store

Check your UCP implementation and AI commerce readiness.

Run Validation โ†’

Common Issues & Solutions

Issue Solution
Router prefix not working Use the HTTP function method or external hosting
CORS errors Ensure Access-Control-Allow-Origin header is set
Dev Mode not available Upgrade to a Wix plan that includes Velo
Changes not live Make sure to click Publish after changes

๐Ÿค– Test with AI Agents

Run AI Agent Simulation

Test how AI shopping agents will interact with your Wix store.

Open Simulator โ†’

Resources