Search.../

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:

{
"property": "og:image",
"content": "https://.../Wix+logo.jpg"
}
javascript | Copy Code

Produces:

<meta property="og:image" content="https://.../Wix+logo.jpg"/>
html | Copy Code

Note: You should always invoke the wixSeoFrontend.metaTags getter outside of the onReady() event handler to ensure receiving the proper response.

Type:

Array<MetaTag>Read Only
NAME
TYPE
DESCRIPTION
name
string

Name of the meta tag. Either name or property are required.

property
string

Name of the meta tag property. Either property or name are required.

http-equiv
string

HTTP header that corresponds to the content.

content
string

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

Copy Code
1import wixSeoFrontend from 'wix-seo-frontend';
2
3// ...
4
5let metaTags = wixSeoFrontend.metaTags;
6
7/* 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 */