Getting Video Rich Snippets for Shopify with JSON-LD for SEO

By Ilana Davis

If you have videos in your Shopify store, by adding structured data for them you can get some additional search enhancements like Rich Snippets, video previews, and inclusion in Google Image Search.

JSON-LD for SEO supports the VideoObject type once you add some additional data to your Shopify store to describe the video.

You can add videos to many different areas of Shopify:

  • Collections
  • Products
  • Pages
  • Blog Posts
  • Homepage (using the shop object)

Each item will need its own set of data added for the video you want to be displayed. e.g. Each product with a video will need this process done, even if the videos are the same.

Additionally, you can only markup one video per URL so pick the one that will be the most useful and have the most impact on your search results.

JSON-LD for SEO doesn’t do anything visually on the page. We only create the structured data for Google.

Need help creating your Video Object Structured Data?

Watch this 2-minute video using the Video Generator

Video Generator

Using JSON-LD for SEO’s Video Generator, you can easily create the output by simply copying and pasting the required fields.

The Video Generator will create the metafield value and, with JSON-LD for SEO installed using metafields as outlined below, we create the structured data for you.

Step 1: Create the metafield

I find it easiest to create the metafield first, especially when using Shopify’s native metafields.

Use Shopify’s Metafields or your metafield tool of choice and add the Video data to the Shopify object like this:

  • namespace: jsonld
  • key: video_object
  • type: json

Note: If you’re using Shopify’s Metafields, you create the definition once per page type. For example, create the metafield definition once for Page. Then in Step 4, you assign the value per Page.

Image of the expected metafield namespace, key and type in Shopify's Metafield section.

Step 2: Create a new Video

In the JSON-LD for SEO Video Generator page, select the button to Create New Video

Video Generator page with a button that says Create New Video.

Step 3: Enter the required fields

Begin to fill in the information. Required fields are designated with an asterisk (*).

Example video fields with Create Video button.

A few things to note:

  • Duration must be in ISO8601 format. This is a bit confusing but also not required. So if you aren’t sure what to put here, you can leave it blank.
  • Content URL would be if your video is, for example, hosted on your website.
  • Embed URL would be if your video is hosted on youtube or Vimeo for example.
  • Upload date only requires the month, date, and year. We will automatically add a timestamp of midnight UTC.
  • Video Identifier is used to link your data. We recommend only adding one set of videos per page, but if you want to add more than one video, create a unique identifier for each video you’ll add to the page. If you don’t, all video data on that page will be linked together.
    • Possible examples could be video1, video2, video3… Alternatively, you could add a name such as video-product, video-benefit… Spaces are not allowed.

JSON-LD for SEO supports multiple videos on a single URL with the Video Identifier, but this is more advanced and might require a developer to help. Each video Metafield Value needs to be merged into a single array and added to Shopify’s metafield.

Once you’ve got all your fields entered, select Create Video to review your information.

Step 4: Assign the value of the metafield to the page

The content you’ve now created will need to be added to the page in Shopify’s admin panel.

Copy the Metafield Value using the Copy to clipboard button.

Video Generator page with the completed output. Arrow pointing to the Copy to clipboard button.

Go to the Shopify Page, Product, Blog etc in the Shopify Admin. Scroll to the bottom of the page and you should see the metafield we created previously.

Page in Shopify's Admin. Arrow pointing to Show All for the metafield section.

Paste the value you copied from the Video Generator.

Video Page in the Shopify Admin's metafield with the value pasted into the field.

SELECT SAVE

Voila! You now have the Video Object structured data. Free free to rinse and repeat for any other videos you have.

Don’t forget to test the page after you’ve created the Video structured data. Instructions on how to test your results are below.

Alternative to using the Video Generator

If you don’t want to use the Video Generator, you can manually add the content to the metafield.

Add required metafields

Using your metafield tool of choice, add the following fields to the key under the jsonld namespace using a string or single line text type.

  • type – (required) Set to “VideoObject”. This is the magic setting that tells JSON-LD for SEO there’s a video here.
  • To add a video to your Shopify homepage, use homepageType instead of type.
  • name – (required) Name of the video.
  • description – (required) Description of the video.
  • thumbnailURL – (required) Url of an image to use for the video thumbnail.
  • uploadDate – (required) When the video was uploaded. This must be in the ISO 8601 date format. e.g. 2018-01-01
    Upload date only requires the month, date, and year. If you use the Video Generator, we will automatically add a timestamp of midnight UTC. Though optional, if you don't use the Video Generator, you should consider adding the timestamp to prevent non-critical issues from Google.
    e.g. 2018-10-27T14:37:14+00:00
  • contentURL – (recommended) Url to the actual media file. This should be the actual .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other video file format.
  • embedURL – Url to a player for the video, e.g. Youtube url.
  • duration – How long the video is. This must be in the ISO 8601 duration format. e.g. 90 minutes would be PT90M or PT1H30M

For example, a single metafield might look like this:

Type: string single-line text
Namespace: jsonld
Key: type
Value: VideoObject

Example of what to enter using the metafields app

Using the metafields listed in the article, this screenshot shows an example of what it might look like with the required fields.

Testing the Video Schema

Once these metafields have been created and saved, you can use Schema Markup Validator to verify the data is correct.

It will take some time before Google updates their results to include your video Rich Snippet.

Video structured data example showing all the fields that were entered.

You can see a demo of what this looks like on the JSON-LD for SEO demo site.

Checkout other Schema Generators included with JSON-LD for SEO

JSON-LD for SEO

Get more organic search traffic from Google without having to fight for better rankings by utilizing search enhancements called Rich Results.