Structured data on Wix dynamic pages using variable-driven schema

Module 57: Wix Dynamic Pages: Advanced SEO for Data-Driven Sites | Lesson 618 of 687 | 38 min read

By Michael Andrews, Wix SEO Expert UK

Static JSON-LD schema on a dynamic page produces the same schema markup on every URL, regardless of the unique content of each record. This defeats the purpose of structured data. Variable-driven schema uses Wix CMS field values to populate schema properties dynamically, so each page has unique, accurate structured data that reflects its specific content.

Why Static Schema Fails on Dynamic Pages

If you add a JSON-LD block with a fixed product name and price to a dynamic product page template, every product page on your site will report the same product name and price to Google. This is not just inaccurate — it can cause rich result failures because Google detects the mismatch between the schema data and the visible page content. Dynamic pages require dynamic schema.

Using Wix Variables in Custom Code Schema Blocks

Implementing variable schema on Wix dynamic pages

Example: Product Schema with Dynamic Field Values

// Wix Velo code in dynamic page to inject product schema
import wixLocation from 'wix-location';
import { currentItem } from 'wix-dataset';

$w.onReady(function () {
  const item = $w('#dynamicDataset').getCurrentItem();
  const schema = {
    "@context": "https://schema.org",
    "@type": "Product",
    "name": item.title,
    "description": item.description,
    "offers": {
      "@type": "Offer",
      "price": item.price,
      "priceCurrency": "GBP",
      "availability": "https://schema.org/InStock"
    }
  };
  // Inject via Velo or custom element
});
Testing Tip: After implementing dynamic schema, test at least 5 different dynamic page URLs using the Google Rich Results Test. Verify that each page returns unique schema values matching the visible content on that specific page. If all pages return identical schema, the variable population is not working correctly.

This lesson on Structured data on Wix dynamic pages using variable-driven schema is part of Module 57: Wix Dynamic Pages: Advanced SEO for Data-Driven Sites in The Most Comprehensive Complete Wix SEO Course in the World (2026 Edition). Created by Michael Andrews, the UK's No.1 Wix SEO Expert with 14 years of hands-on experience, 750+ completed Wix SEO projects and 425+ verified five-star reviews.