Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Collect metadata

Explains how metadata is used when working with Optimizely Content Recommendations, part of the Optimizely Recommendations suite. Defining metadata may improve the quality of the content recommendations displayed to website visitors.

Optimizely Content Recommendations uses metadata for the following two main purposes:

  • Within flows as a way to categorize content, based on common metadata attributes. See Setting up sections and flows.
  • Within rendering to specify what elements to display for each content item recommended.

Optimizely recommends the following metadata fields and will support the majority of content recommendation use cases:

  • Title – Title should appear under the meta property og:title in the follow format.
    <meta property="og:title" content="value" />
    <meta property="og:title" 
          content="High yield spreads aren't as narrow 
                   as they may first appear" />
    
  • Description – Description should appear under the meta property og:description in the following format.
    <meta property="og:description" content="value" />
    <meta property="og:description" 
          content="While high yield bonds’ yield to maturity
                   may be close to historic lows,
                   credit spreads themselves are not, 
                   particularly when adjusted for favorable
                   changes in credit quality and duration." />
    
  • Image – Image should appear under the meta property og:image in the following format.
    <meta property="og:image" content="value" />
    <meta property="og:image" 
          content="https://www.episerver.com/globalassets/09.-tests/testimagesvideo/opengraph_episerver.jpg" />
    
  • Published date – Published date should appear under the meta property article:published_time in the exact format below.
    <meta property="article:published_time" content="value" />
    <meta property="article:published_time" content="2019-10-18T15:19:00.000-04:00" />
    
  • Article category – Article category should appear under the meta property article:category in the following format.
    <meta property="article:category" content="value" />
    <meta property="article:category" content="Fixed-Income Insights" />
    

Additional metadata fields are also supported using the custom namespace (idio:) to pass information. For example:

<meta property="idio:custom_variable" content="value"/>

If you have multiple values for a metadata item, Content recommendations collects them all. For example:

<meta property="article:tag" content="Tag One" />
<meta property="article:tag" content="Tag Two" />
<meta property="article:tag" content="Tag Three" />