Wix Velo: Dynamic SEO Titles from CMS Database Fields
Module 66: Wix Velo & Dev Mode: Advanced SEO for Developers | Lesson 669 of 683 | 35 min read
By Michael Andrews, Wix SEO Expert UK
When Wix SEO Patterns are not flexible enough, Velo gives you full programmatic control over how each CMS-driven page presents itself to Google. Using the wix-seo API, you can pull fields from any database collection and build unique, keyword-rich titles and descriptions for every dynamic page on your site. This lesson walks through the complete code implementation, from setup to testing.
Why Static Meta Tag Templates Are an SEO Problem
When you have 200 dynamic pages all using the same meta title template like "Product Name | Your Site", Google sees 200 pages with very similar title structures. While the product name varies, the template-driven approach often produces titles that are either too generic or too long. Worse, the meta description is typically identical across all pages if you have not set up dynamic meta descriptions. Duplicate meta tags signal low content quality and result in lower click-through rates.
Setting Up Dynamic Meta Tags with the wix-seo API
Wix Velo provides the wix-seo module which includes methods for programmatically setting page title, meta description, Open Graph tags, and other SEO properties. The key function is wixSeo.setLinks() and wixSeo.setMetaTags() which can be called from a page's onReady function using data loaded from the connected collection.
// Page code for a Wix dynamic product page
// Place this in the page's .js file in Velo Dev Mode
import wixData from 'wix-data';
import { setTitle, setMetaTags } from 'wix-seo';
$w.onReady(async function () {
// Get the current dynamic page item
const item = await wixData.getCurrentItem();
if (item) {
// Set dynamic title tag
setTitle(`${item.title} | Buy Online | Your Shop Name`);
// Set dynamic meta description
setMetaTags([
{
name: 'description',
content: `${item.shortDescription} Shop ${item.title} with free delivery. In stock now.`
}
]);
}
});
Designing Your Meta Tag Templates in Velo
- Title tag: [Item Name] | [Category] | [Brand Name] - keep under 60 characters total
- Meta description: [Specific benefit or feature] + [call to action] + [brand name] - 140 to 155 characters
- Include the primary keyword naturally in both the title and description
- Use collection fields that contain unique, meaningful data - avoid using ID fields or internal codes
- For blog posts, include the author name and category in the meta description for E-E-A-T signalling
- For product pages, include price or availability if these are stable and accurate
Full implementation workflow for dynamic meta tags on Wix
- Enable Velo Dev Mode on your Wix site.
- Open the dynamic page connected to your database collection.
- In the page code panel, import wix-seo and wix-data modules.
- Write the onReady function that fetches the current item and calls setTitle and setMetaTags.
- Test the page in preview mode and use the browser source viewer to verify the meta tags are injecting correctly.
- Test multiple different collection items to ensure the dynamic content is populating correctly.
- Publish the site and validate a sample of pages using Google Search Console's URL Inspection tool.
How to Create Dynamic Meta Tags with Wix Velo for CMS Pages
Dynamic meta tags ensure every page in your Wix database collection has unique, keyword-rich titles and descriptions rather than sharing a generic template.
Full implementation guide for dynamic meta tags on Wix CMS collection pages using Velo
- Open your Wix site in the Wix Editor and enable Dev Mode via the top menu: Dev Mode > Turn on Dev Mode.
- Navigate to the dynamic page connected to your database collection (identified by the curly brace icon in the Pages panel).
- Click on the page to select it, then open the page code file from the Velo sidebar.
- At the top of the page code file, add: import wixData from 'wix-data'; and import { setTitle, setMetaTags } from 'wix-seo';
- Inside the $w.onReady function, add: const item = await wixData.getCurrentItem(); to retrieve the current collection item data.
- Below the getCurrentItem call, add a conditional check: if (item) { and then call setTitle with a template string using item fields.
- Add a setMetaTags call to set the meta description using item fields - aim for 140 to 155 characters combining the item's key benefit and a call to action.
- Close the conditional block with } and save the page code file.
- Use the Wix Editor preview to open several different items from your collection and inspect the page source to confirm unique meta tags are appearing.
- Publish the live site and use the Google Search Console URL Inspection tool to confirm the meta tags appear correctly on your live dynamic pages.
- Test at least five different collection items using the URL Inspection tool to ensure the dynamic population is working consistently across all items.
Two things to get right: rendering timing and canonical URLs
When you set meta tags with the wix-seo API you are setting them as the page loads, so there is a rendering step between what the code does and what Google records. In practice Google renders Wix pages and picks these up, but you should never assume it, so after you ship, inspect a few live URLs in Search Console with the URL Inspection tool and look at the rendered HTML to confirm your dynamic title and description are actually there. If they are missing, the usual cause is the code running too late or erroring on an item with a blank field, so handle missing fields with a sensible fallback rather than letting the template output a gap. The second thing people forget is that titles and descriptions are only half the job on dynamic pages. Use the same wix-seo call to set a self-referencing canonical for each item with setLinks, so near-identical dynamic pages are not read as duplicates of one another, and set your Open Graph tags at the same time so shared links look right. A dynamic page with a unique title but no canonical is still at risk of being merged or dropped. For the no-code version of the same idea, see Wix meta tags, and for schema on these same pages, see structured data on dynamic pages.
This lesson on Wix Velo: Dynamic SEO Titles from CMS Database Fields is part of Module 66: Wix Velo & Dev Mode: Advanced SEO for Developers in The Most Comprehensive Complete Wix SEO Course in the World (2026 Edition). Created by Michael Andrews, a Wix Marketplace Legend Partner with 14 years of hands-on experience, 800 completed Wix SEO projects and 456 verified five-star reviews.