Can Google see metafields in Shopify and index them?

By Ilana Davis

Metafields are Shopify’s term for custom fields. They are a method to add and pull various types of information.

That information could be visually on the page or stored as data in Shopify’s admin.

What you do with the information in metafields could be different for every store.

When displayed visually on the page, Shopify strips out anything that says it’s a metafield and converts it to HTML. Instead, they only display the output. Meaning, that I cannot tell when a piece of text on the page is from a metafield.

All I see is the end result, the text.

Google sees the same result.

For those who are curious, let’s use an example to explain how it works.

Let’s say I want to display the number of items per case. I’ll create a metafield for the number of items in a product.

Creating a metafield in Shopify. Name = QTY per pack. Description = QTY per pack to calculate price per set. Number integer.

On the product page in Shopify’s admin, I can then assign the number of items in that product.

Assigning a metafield value to the product. QTY per pack is 20

Creating a metafield doesn’t do anything. At this point, I’m storing data in Shopify and that’s it. Now I need to do something with that information.

Using Dawn, Shopify’s Online Store 2.0 base theme, there is a Custom Liquid section. This is where I can add code to the template without ever touching the theme code.

To display the information I added to the product I need to write some code.

{{ product.metafields.my_fields.qty_per_pack }}
Liquid code for metafield displayed visually

The output is 20.

But this means nothing without adding context. 20 what?

I can add the context before or after. In this case, I’ll choose after.

{{ product.metafields.my_fields.qty_per_pack }} items per case
Liquid code for metafield displayed visually with context

Now that we have the metafield showing on the page, let’s get back to the question.

Can Google see metafields that are visually displayed on the page?

Let’s look at the source code. Right-click on the customer-facing product page. Select View Source and a new window will open. Search for “20 items per case”.

Metafield with 20 items per case displayed visually on page and the source code to support it

Whatever is in the source code, Google can see.

The last part of the question is whether Google indexes content from metafields?

There is no way to know what Google indexes or not.

Google can see the information. What they do with that information is completely up to their algorithm.

So yes, Google can see whatever information you’ve entered into a metafield that is visually displayed.

This is only for visually displayed metafields. For metafield that are stored in the admin only, Google does not see that information because it’s never shared with them.

When using metafields to visually display content on the page, don’t forget to add proper HTML tags (headings, paragraphs etc). For example, the alt-text for images needs to be added for both SEO and web accessibility purposes. Also, the code above has no stylization (CSS or HTML) so it’s going to display plain boring text.

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.

Linking Llama

Link discontinued products to their best substitute. Keep discontinued products published on your website and continue to benefit from traffic to these pages.