Seo Pattern Object


An SEO pattern is a template of SEO tags defined for one page type, such as every blog post or every store product. A pattern's tags may contain variables, written as {{variable}}, that are filled in with each item's own values when its page renders, so a Wix user sets the tags for a whole page type once instead of item by item.

Every page type always has a pattern in effect. When a site has no pattern of its own for a page type, the built-in Wix default applies, and source reports which of the two is in effect.

A change to a pattern reaches the live site without a site publish, and applies to every page of that type that has no SEO tags set for the item itself.

Properties
defaultPatternSeoPatternBlobRead-only

The pattern Wix provides for the page type, which applies whenever the site has no pattern of its own.

Always returned, so you can see what a reset would restore.


idstringRead-onlymaxLength 400

SEO pattern ID, in the format {pageType}.

For a pattern that applies to a single page built from a Wix Data collection, the format is {pageType}:{pageId}.


languagestringRead-onlymaxLength 100

Language the pattern applies to, as an IETF BCP 47 language tag. For example, en-US for U.S. English.

A page type has a single pattern, so this reports the site's primary language.


originstringRead-only

What made the most recent change to the pattern, for example a Wix user or the site migration flow. Derived from the caller, not from the request.

Reported only on the response to a write, and on the event the write emits. It isn't stored with the pattern, so Get SEO Pattern and List SEO Patterns always report ORIGIN_UNSPECIFIED, as does a write by a caller Wix doesn't identify as a specific origin.


pageIdstringmaxLength 200

ID of a single page built from a Wix Data collection, when the pattern applies to that page alone rather than to the whole page type.

Supported only for the WIX_DATA_PAGE_ITEM page type.


pageTypestringRead-onlymaxLength 100

Page type the pattern applies to. A known page type name, such as STATIC_PAGE, BLOG_POST, or STORES_PRODUCT.

See the list of common page types.


patternSeoPatternBlob

The site's own pattern for the page type, which takes precedence over the Wix default.

Empty when the site has no pattern of its own, in which case defaultPattern applies.


sourcestringRead-only

Which pattern is in effect for the page type: the site's own, or the Wix default.

Did this help?