Metafield is one of Shopify’s most critical features because it allows you to configure the functionality and appearance of your online store. Yet, this feature is usually complicated for regular users. Many find it difficult to understand, but we’re here to help. This article will explain how Shopify metafields work and how to use them to customize your store.
What is Shopify Metafields?
It is a custom field where you can place extra information in a way that’s usually impossible with Shopify’s basic configuration. It serves a core purpose: adding extra information about your products.
Shopify doesn’t support many data types by default. But, metafields lets you add these data types you can’t normally add from the Shopify website editor.
You might wonder, “Why not just put all the information in the product description?” The answer is that Shopify treats production as static texts with limited navigation and customization. Metafields allow you to add extra information and customize them how you want.
Let’s say you run an electronics store selling PCs and mobile devices. You can use metafields to add detailed specifications about a PC in an interactive way.
Where Can You Add Shopify Metafields?
You can add a meta tag to Shopify in ten different parts of your site, namely
Products: Adding rich details to your product description to entice a customer.
Variants: Adding specific information about product variants, e.g., different frame dimensions for an artwork.
Collections: Adding custom fields about product collections, e.g., alerting customers about limited edition products.
Customers: Personalizing your customers’ experience with data such as previously purchased items.
Orders: Adding extra information to your order page, such as customer ratings and shipping information.
Location: Creating metafields to add information for specific store locations.
Pages: Adding metafields to custom Shopify pages.
Blogs: Adding a customized field to your store’s blog, e.g., a wheel spinner to get perks.
Blog posts: Adding customized fields to your posts to convert visitors into customers.
Markets: Adding information to create a localized buyer experience, e.g., changing the user’s language, currency, and product prices based on their IP address location.
Let’s dive deeper into the three most popular metafield types: product, collections, and customers.
Products
Product descriptions are the most common use case for metafields. Shopify product metafields allow you to add extra details to make your product stand out from the competition. They add more flavor to your product descriptions and increase the chances of a user proceeding to the checkout stage.
For example, if you sell clothing, you can use a metafield to add a detailed product description, including length, fabric type, shipping type, exchange policy, etc.
Source: Zari Banaras
Metafields inspire more confidence in customers and make them more willing to buy your item.
Collections
Metafields let you add information that can increase conversions in your product collections pages. For instance, you can include ratings below each product listing to convince the customer that many people have previously purchased the product and loved what they got.
Source: GemPages
Customers
You can use a metafield to display unique information pertaining to a customer. This process is called personalization and improves the chances of getting conversions from a product.
For example, an online restaurant can use metafields to remind customers about their allergies and not to order items containing what they’re allergic to. This feature requires the customer to have given their allergy information to you before, and you’ll summon the information via an API.
Personalization makes the customer feel esteemed and more likely to purchase your product.
How to Use Shopify Metafields
We want to examine how to use metafields in Shopify. Follow these steps:
Step 1: Set up a metafield definition
Log into your Shopify admin.
Head to Settings > Custom Data.
Under Metafields, choose the part you want to add it to, e.g., Products, Collections, Customers, etc. We’re using Products in this example.
Click Add Definition and fill in the name, namespace, key, and Select the content type. You can also add a description (optional).
Name: Type whatever you want to name your metafield. This name identifies the specific metafield from your Shopify admin page.
Namespace and Key: The namespace categorizes the metafield. For example, you can use the namespace “customer_details” to save all the metafields you’re using to highlight customers’ information.
The key is the unique name for the metafield. Separate the name and key with a full stop “.” e.g., customer_details.currency.
Type: Choose the type of data in the metafield from Shopify’s dropdown list. Examples include single-line text, multi-line text, integer, decimal, etc.
Description (optional): You can include additional descriptive information for the metafield, e.g., what values you’re meant to enter.
You can choose any name, namespace, key, and/or description. They don’t affect anything: they’re only there to identify and categorize the metafield. However, you must pick the right type, or your metafield won’t work.
Check Storefront under Access on the right-hand side. This option allows your online store to access and display the content you create.
Click Save to create the metafield definition.
Step 2: Add a value to the metafield in the product settings
You’ve created a metafield description on your store. Now, it’s time to add a value to the metafield. You can add the value one by one or add it to multiple products simultaneously.
One by One
Open your Shopify admin.
Go to Products > All products and choose the product you want to add more information about via the metafield.
Scroll down to the Metafields section on the product settings page.
Add a value to the metafield and save it.
Bulk
You can use the Shopify metafields bulk update feature to add values to multiple products simultaneously.
From your Shopify admin, head to Products to see the list of all your products.
Use the checkbox on the left-hand side to select all the products you want to add the values to. If you have over 50 products and want to add a value to all of them, click Select all products in this store at the top (this option appears immediately after selecting one product).
Click Bulk edit on the menu that pops up, and you’ll be redirected to the bulk editor page.
Click Columns in the top right corner, scroll down to the bottom, and choose which metafield definitions you want to add. The column for the chosen metafield automatically opens on the table.
Close the Columns menu and scroll rightwards to the metafield section on the bulk editing table. You can add metafield values to multiple products on the same page instead of navigating to individual products to add them.
How to Display Metafields on Your Product Pages
You’re not done after adding metafields to your products. There’s one more step to display the products on your site. You can do that via the Shopify code editor or the theme editor.
Theme Editor
In your admin panel, head to Online Store > Themes and click Customize.
Find the product you want to add the metafield to.
Add a text block to the product listing where the metafield will sit in. You’ll find it under Template > Product Information.
Open the text block after adding it. By default, the text block has "text block" inside, so remove this text.
Click the Add dynamic content button (shaped like a barrel) and select the metafield you want to add.
Save your changes, and the metafield will appear on the product listing on your website.
Here’s how the metafield looks on Shopify’s backend:
Here’s how it appears on the frontend to a visitor:
Our sample metafield, “$Currency Example,” doesn’t have any meaning because we’re just illustrating. The idea we’re passing is that you can add anything you want in a product metafield.
Code Editor
You can use the code editor to add metafields in ways that the theme editor doesn’t normally support. However, there’s no standard process to do this. It depends on your theme and what type of metafield you’re adding.
Anyone doing this likely needs coding experience or needs to hire a developer to examine their site and help them add the metafield.
Metafield Content Types
Before concluding, let’s dive deeper into the different types of metafields you can add to a Shopify store.
Number
Integer: Whole numbers only.
Decimal: You can add numbers with decimals, e.g., product dimensions (3.1 inches, 4.2 inches, 5.3 inches, etc.)
Money: You can display the price of your product.
Text
Single-line text: A single line of text without breaks.
Multi-line text: Multiple lines of text.
Rich text: Display a full-width block of text with custom styling.
Reference (Internal Links)
File reference: You can upload files into the metafield, e.g., PDF product manuals and user guides.
Page reference: You can add a link to another page in the metafield, e.g., a link to your returns policy or terms & conditions page.
Product reference: Showcase related products to users.
Product variant reference: You can link to similar products your customers might be interested in.
Collection reference: Add a link to the collection the product is part of.
Others
Date: Add dates, e.g., shipping dates, best-before dates, etc.
Date and time: Add a date and a specific time.
URL: Add an external link to your metafield.
Rating: Add ratings for social proof.
Color: Let customers view products in different colors.
True or false: Create a checkbox so customers can see if your product has a feature they’re looking for.
Recap: Why Are Shopify Metafields Important?
Shopify metafields are important because they let you display specialized information on your store in ways Shopify’s basic version doesn’t. For example, an online grocer might want to display expiry dates on their products or a clothing manufacturer might want to display different dimensions.
Metafields help you share the right content with the right audience in the right context. They allow you to create personalized shopping experiences for your customers. The great thing about metafields is that you can add them without writing any code. We’ve explained how to add metafields in Shopify and how to use them effectively.
Shopify Metafields FAQs
How can I use Shopify metafields?
Metafields allow you to add any extra information you want to a product. You can include any piece of information that adds more context to your product and entices the viewer to buy it.
You can add metafields without touching a line of code, the process which we’ve described in this article.
Do metafields affect SEO?
Metafields affect search engine optimization (SEO) because search engine crawlers can read them. Search engines like Google can read and display metafields when people search for your website.
How do I upload Shopify metafields in bulk?
You can select the products and use the bulk edit feature to add metafield values to them on the same page.
Do Shopify metafields have a limit?
You can add up to 200 metafields for each part of your site, such as products, collections, blog posts, etc. 200 is the hard limit.
What are the advantages of Shopify metafields?
Shopify metafields allow you to provide more information and context about your products to customers. They help you create a better customer experience and improve your site’s appearance.
What happens if a metafield doesn’t have a definition?
Having no definition means Shopify won’t know what to do with the metafield, making it null and void. Definitions are compulsory to label and organize your metafields.