setMetaTags( )


Sets the page's SEO-related meta tags.

The setMetaTags() function creates SEO-related meta tags in the head of the page.

The keys in the specified metaTags objects represent the keys in the tag, while the values in the metaTags object represent the values in the tag.

For example:

Copy
1

Produces:

Copy
1

When setting og:image meta tags, the content can be and external image URL or a Media Manager image URL as described here.

The meta tags you set overwrite any meta tag information set earlier.

Notes:

  • Do not use setMetaTags() to create tags for the title. Use the setTitle() function instead.

  • You should always set the metaTags inside the onReady() event handler to ensure search engines can read it.

Method Declaration
Copy
Method Parameters
metaTagsArray<MetaTag>Required

The meta tags to set.

Was this helpful?
Yes
No