Metadata and microdata

Updated 08/02/17.

Providing additional information about the page and/or elements to help search engines intelligently display relevant content to users.

There are a number of microdata formats that should be used wherever appropriate to aid in the content of the pages to be displayed in a useful, relevant way by search engines.

Facebook Open Graph Stories and Twitter summary cards

To set what is displayed when a page is shared on Facebook and Twitter add the following meta tags within the head of document.

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@[ Twitter username ]" />
<meta name="twitter:url" property="og:url" content="[ Page URL ]" />
<meta name="twitter:title" property="og:title" content="[ Page title ]" />
<meta name="twitter:description" property="og:description" content="[ Page description ]" />
<meta name="twitter:image" property="og:image" content="[ Social card image URL ]" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="[ Locale ]" />

Note:

  • [ Twitter username ]: The Twitter @username the card should be attributed to.
  • [ Page URL ]: The page url used must be the cannonical url.
  • [ Page title ]: A concise title for the related content, with a maximum of 70 characters.
  • [ Page description ]: A description that concisely summarizes the content, with a maximum of 200 characters. This must not be the same as the page title.
  • [ Social card image URL ]: The image must be the most prominent image that represents the content on the page, unless this does not crop well and then another appropriate image on the page should be chosen. If there is no appropriate image on the page then it should be set to the Aviva logo. The images must be at least 200px by 200px and less than 1MB in file size. Note this image will be cropped to a square for the twitter summary card. The image must be served via http not https otherwise it will not be loaded by Twitter or facebook. Never replace the image used here as Facebook caches any images once references, always use a new image url.
  • [ Locale ]: Allows setting of locale and language being supported eg. for the United Kingdom the value would be set to 'en_GB'. For a full reference of supported locales for Facebook see their internationalization documentation.

If the article open graph story or Twitter summary card with large image is more appropriate for the content type update the 'twitter:card' content value from 'summary' to 'summary_large_image' and 'og:type' content value from 'website' to 'article'. The image provided must be at least 600px wide, 315px high.

It is recommended that where ever possible the Facebook Open Graph Stories and Twitter summary cards are combined to remove duplication in markup. If this is not suitable for the situation see the individual solutions below.

Facebook Open Graph Stories

To set what is displayed when a page is shared on Facebook add the following meta tags within the head of document.

<meta property="og:title" content="[ Page title ]" />
<meta property="og:url" content="[ Page url ]" />
<meta property="og:image" content="[ Image url ]" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="[ Locale ]" />

Read more about Facebook Open Graph Stories.

Twitter summary card

To set what is displayed when a page is shared on Twitter add the following meta tags within the head of document.

<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@[ Twitter username ]" />
<meta name="twitter:url" content="[ Page URL ]" />
<meta name="twitter:title" content="[ Page title ]" />
<meta name="twitter:description" content="[ Page description ]" />
<meta name="twitter:image" content="[ Social card image URL ]" />

Twitter summary card with large image

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@[ Twitter username ]" />
<meta name="twitter:url" content="[ Page URL ]" />
<meta name="twitter:title" content="[ Page title ]" />
<meta name="twitter:description" content="[ Page description ]" />
<meta name="twitter:image" content="[ Social card image URL ]" />

Read more about Twitter summary cards.

Site search

Allows users to search the site directly from within a Google search. This markup is only required on the homepage of the website.

<form action="/search/" method="get" role="search" id="search" itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
	<fieldset>
		<legend>Search</legend>
		<meta itemprop="target" content="https://www.aviva.co.uk/search/?q={q}"/>
		<label for="q">Search site</label>
		<input type="search" name="q" id="q" value=""  itemprop="query-input"/>
		<input type="submit" name="..." id="..." value="Search" />
	</fieldset>
</form>

Breadcrumb

<p itemscope itemtype="http://schema.org/BreadcrumbList">
	<span>You are currently within </span>
	<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="item" itemscope itemtype="http://schema.org/WebPage"><a href="/" itemprop="url"><span itemprop="name">Homepage</span></a></span><meta itemprop="position" content="1" /></span>
	&gt;
	<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="item" itemscope itemtype="http://schema.org/WebPage"><a href="/insruance/" itemprop="url"><span class="a-wayfinder__title" itemprop="name">Insurance</span></a></span><meta itemprop="position" content="2" /></span>
	&gt;
	<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="item" itemscope itemtype="http://schema.org/WebPage"><a href="/motor-insurance/" itemprop="url"><span class="a-wayfinder__title" itemprop="name">Motor insurance</span></a></span><meta itemprop="position" content="3" /></span>
	gt;
	Car insurance
</p>

See the wayfinder component for the front-end framework implementation. See the breadcrumb schema specification for more details.

Product

For any product or service offered eg. Car insurance. As a minimum brand, name and url should be specified.

See the product schema specification for more details.

Aggregate rating

The average rating for a product based on multiple ratings or reviews. This is displayed within google search results as a star rating.

See the AggregateRating specification for more details.

Review

A review of an item/product

See the review schema specification for more details.

Article

An article, such as a news article or piece of investigative report.

See the article schema specification for more details.

Blog

A blog

See the blog schema specification for more details.

Event

An event happening at a certain time and location.

See the event schema specification for more details.

Video

A video file.

See the VideoObject schema specification for more details.

Audio

An audio file.

See the AudioObject schema specification for more details.

Further information

For more information about microdata and how to implement it please see Schema.org

To test your microdata implementation Google's Structure Data Testing Tool can help ensure the data is formatted correctly.