metaTags
Gets the page's SEO-related meta tags.
Description
The metaTags
property retrieves the SEO-related meta tags from the head of the page.
The keys in the returned metaTags
objects represent the keys in the tag, while the values in the
object represent the values in the tag.
For example:
javascript | Copy Code{"property": "og:image","content": "https://.../Wix+logo.jpg"}
Produces:
html | Copy Code<meta property="og:image" content="https://.../Wix+logo.jpg"/>
Note: You should always invoke the
wixSeoFrontend.metaTags
getter outside of theonReady()
event handler to ensure receiving the proper response.
Type:
NAME
TYPE
DESCRIPTION
Name of the meta tag. Either name
or property
are required.
Name of the meta tag property. Either property
or name
are required.
HTTP header that corresponds to the content
.
Meta tag value. For og:image
meta tags, the content
can
be an external image URL or a Media Manager image URL as described here.
Related Content:
Was this helpful?
Get a page's meta tags
1import wixSeoFrontend from 'wix-seo-frontend';23// ...45let metaTags = wixSeoFrontend.metaTags;67/* metaTags:8 *9 * [10 * {11 * "name": "robots",12 * "content": "noindex"13 * }, {14 * "property": "og:image",15 * "content": "wix:image://v1/6...2.jpg/a.jpg#originWidth=970&originHeight=120"16 * }17 * ]18 */