How to Add Meta Tags in Shopify?

Adding meta tags to your Shopify store template allows for greater customization of your search experience. Here's some pointers on how to access and edit the relevant portions of your Shopify theme template.

Step 1: Open your theme in the Shopify dashboard

Log into your Shopify dashboard and select Online Store -> Themes. From this view, select Edit HTML/CSS. This will bring you to a page where you can access the source code for your active Shopify store template.

Online Store

Step 2: Edit your Layout (theme.liquid)

In the left hand column you will see a list of all the files in your template. Within the Layout folder you should see a file named theme.liquid. This is the base template for your Shopify store. Liquid is a template language that Shopify uses for all pages within a theme.

The theme.liquid will be the main file (if not the only theme file) you'll need to edit in order to add your custom meta tags.

Step 3: Add meta tags

Add your meta tags within the <head> section of theme.liquid file, using description approved syntax like so:

<meta name="description" data-type="[page]" content="{{ page_description }}" />

Add your meta tags


Examples:

Below are example meta tags on how to dynamically retrieve the title and price values of a product and inject them into the Swiftype meta tag format.

Note: The following examples might need to be edited for your specific theme and site.

Product Title

<meta name="title" data-type="string" content="{{ product.title }}" />


Product Price

<meta name="price" data-type="enum" content="{{ product.price }}" />


Similar syntax and logic can be applied to other template and product variant values that you would like to be indexed by the web crawler.

Join our Newsletter

Never miss the latest offers, voucher codes and useful articles delivered weekly in your inbox.