Using metafields in Shopify has proven to be a game-changer. Before metafields existed, Shopify merchants relied on developers to add extra data to their online store for a long time. This required extensive code use in the backend. With metafields being introduced to Shopify admin, merchants found it easier to add custom fields with more data they could add, display in the storefront, or use internally.
Table of Contents
- Changes In Metafields After Shopify 2.0
- Where Are Metafields Used?
- Types Of Metafields In Shopify
- Shopify Products Metafields
- Shopify Variants Metafields
- Shopify Collections Metafields
- Shopify Customers Metafields
- Shopify Orders Metafields
- Shopify Pages Metafields
- Shopify Blogs Metafields
- Shopify Blog Posts Metafields
- Shopify Draft Orders Metafields
- Shopify Companies Metafields
- Shopify Company Locations Metafields
- Shopify Locations Metafields
- Shopify Markets Metafields
- Steps To Create Metafields In Shopify
- How To Bulk Edit Metafields In Shopify?
- What’s The Difference Between Metafields & Metaobjects?
What Is A Metafield?
Metafields are custom fields that are used for adding extra information that is not, by default, present in the Shopify admin. You can add extra elements to your online store for functionality and appearance. It can be used for internal tracking or to display certain information on your website. You can add them to create file download buttons, setting dates, adding numerics, special features, etc.
The blueprint of a metafield typically looks like this:
A resource is a category in which your metafield will fall – products, variants, collections, orders, etc., your attribute is the metafield itself, the namespace is used for metafield grouping to avoid any conflicts, and the key is the metafield’s name.
If you’re a merchant who wants to use metafields and learn about its nitty-gritty, then you’ve reached the right place. This blog exclusively explains metafields after the Shopify 2.0 update.
(To learn about the previous version, Shopify 1.0, click here.)
Without any further ado, let’s dive into it.
Changes In Metafields After Shopify 2.0
Shopify upgraded from the 1.0 version to the 2.0 with some upgrades that have made the merchants’ jobs easier. With new features and enhancing the existing ones, Shopify has simplified the store management process and made it more flexible.
With this, there has been a change in the metafields, too, with the intervention of some new ones. In Shopify 1.0, merchants needed to add codes, third-party apps, or APIs to their themes, but with the new metafields in version 2.0, there is no requirement to add a code separately. You can make direct changes in the theme editor.
How Will This Benefit The Merchants?
- You have the option to add specific permission to your store – you can either display the metafields to your storefront or use it for internal purposes.
- Directly add the new metafields without the need for a code or a third-party app.
- The new version lets you use the metafields for free, with no additional charges.
- Metafields work in harmony with the Liquid code. You can selectively target your metafields based on the conditions it fulfills. For example, displaying a discount coupon after customers add 3-4 items to their cart.
Where Are Metafields Used?
Metafields allows you to add customizable fields to your Shopify store apart from the standard required data in Shopify admin. You can add or customize different functionalities, track internally, and display information on your online store.
For example, see this Golf store that gives more information on the golf iron’s parts. A customer can also customize it to their liking. Apart from the size, it also tells the customers that this is for right-handed people. These extra fields giving more information about the product are metafields.
Now that you know where metafields are used, let’s see the different types of metafields you can use.
Types Of Metafields In Shopify
There are plenty of metafields that you can add through your Shopify admin. They are:
Shopify Products Metafields
The product metafields in Shopify help merchants add a special category to their Shopify store’s product page. They include and display additional product information, which is not defaulted in the Shopify admin.
Here is an example where you can get more information about the product:
Shopify Variants Metafields
If you want to add particular fields to your products, such as colors, pattern type, fabric, etc., you use variant metafields. They are custom fields that provide more options for a specific product & can be added to the product page of your Shopify store. Here is an example where the customer has the option to choose any color:
Shopify Collections Metafields
Like other metafields, it allows you to store extra details for your product collections on your Shopify store. With the collection metafields, you can make your store appear more distinctive. Here is how a store specifies a 60% off sale on the men’s collection:
Shopify Customers Metafields
Customer metafields help store and track your customer’s information like date of birth, email address, contacts, etc. Apart from the usual information, you can add more data and make your store distinct and appealing. For example, if you sell dairy products but want to track vegan customers who’d prefer almond or soy milk, customer metafields will be useful.
Shopify Orders Metafields
Sometimes, a merchant wants to add more information related to their orders to give their store’s customers more options while checking out.
For this purpose, orders metafields can help. They can help prioritize the order list, add remarks to products, and choose standard or express delivery (with true & false boolean option) or rating.
This section shows the use of order metafields:
Shopify Pages Metafields
If merchants want to add more or different data to different pages on their store’s website, they can use the page metafields. One can customize it and make their pages unique according to their preferences.
For example, you can add your store’s contact details on the ‘Get In Touch’ page or display discounts on specific pages.
Shopify Blogs Metafields
Some merchants prefer adding blogs to their websites. For that, the blog metafield can help. This metafield is used to store information related to the blog categories. You can access this in the Online Store section of your Shopify admin. From there, locate Blog Posts and find Manage Blogs.
Shopify Blog Posts Metafields
The blog post metafields help add custom data to particular blog posts. If, for example, you want to display different products on different posts, this metafield can be used. This can also be accessed on the Online Store option in your admin > Blog posts.
Shopify Draft Orders Metafields
When merchants need to add extra information or data to their drafts on Shopify admin, they can benefit from the draft order metafields. Let’s say you want to add a different tax applicable in only a few countries and want to add it to your draft orders; then, use this metafield.
Shopify Companies Metafields
This metafield creates a custom field in the companies section. You can access it through your Shopify admin by going to Customers > Companies.
You can use it internally or display it on your Shopify store.
Shopify Company Locations Metafields
If you want to add more information to your company’s locations, say a landmark or change in address, this metafield will do the job for you.
Shopify Locations Metafields
This metafield adds an extra custom detail of your location to your online store.
Shopify Markets Metafields
To track and add extra information to your markets, this metafield can be used. You can access this on Liquid, the templating language that contains the code files and focuses on Shopify’s theme building.
Steps To Create Metafields In Shopify
Let’s delve into the process of creating metafields. With the new Shopify 2.0 version, you can easily add the metafields to the Dawn theme (or any other that is compatible with 2.0). Here is a step-by-step method that explains it in depth:
Step 1: Create Shopify Metafield Definition
Metafield definitions are like templates that map to a particular section of your store with values that you provide. For every metafield you create, you have to begin with a metafield definition. Let’s see how to create one:
- Visit your Shopify admin. In that, locate Settings.
- In Settings, scroll down and locate Custom Data.
- In that, select a metafield you want to create. We will select Products for this example.
- Now, select ‘Add definition.’
- Note: There is also a category of metafields with no definition. They only have a namespace and key. With the new upgrade, it is crucial to give the definition a name.
Step 2: Add Values To Metafields
After clicking on Add definition, it is time to add the namespace, key, and value types for the metafield.
- Fill in the data it asks you.
Descriptions help describe your metafields. Adding a description is optional.
- Now, click on Select Type to add what type of value needs to be added.
- Specify the value limit and characters.
- If you want to display your metafield to your online store, locate Access > Check the Storefronts on the right side.
- Save the changes you made.
Step 3: Displaying Metafields On Shopify Store
Thanks to Shopify 2.0, you have the option to either publish the metafields to your website or use it internally.
In case you choose to publish, here is how you can do it:
- On your Shopify admin, go to the Sales Channel section. In that, visit Online Store > Themes.
- Locate your preferred theme. Click Customize.
- You’ll reach the theme editor. In that, on the top, you’ll notice a drop-down menu. Click on it.
- Select Products > Default product.
- On the left, locate Template > Product Information section > Add Block.
- In that, select the Collapsible row.
- On the left side, it will ask to name the heading. Give it a name. You will also see an option to add an icon.
- In the last part, you’ll notice a bin-like icon called ‘connect dynamic source’ next to ‘Row content.’ Click the icon.
If you notice the + sign, you have the option to add twenty metafields in one template and then add one metafield at a time:
- Find the metafield you want to display.
- Finally, click Save to publish it on your online store, and the changes shall be made. You can visit your website to check.
To edit your theme code, use Liquid to reference your metafields and add them to your pages.
How To Bulk Edit Metafields In Shopify?
Is bulk editing the metafields possible? The answer is yes, you can. To edit in bulk, you need to visit the Products section on your Shopify admin account. To do so, follow the steps below:
- Go to the Products section.
- In that, on the top, click the check box. This will select all the products you have added.
- After selecting the check box, locate Bulk Edit below. Click it.
- On the top right, locate Columns.
- Scroll down and locate Metafields. Then, select the metafield you want to edit in bulk.
- Make the changes. Then, save it. For any errors, fix them and then click the Save button again.
Also, to learn how to use Shopify metafields in Google Shopping, click here.
How To Map The Metafields To Google Merchant Center?
Mapping the metafields to Google Merchant Center is possible. For quicker mapping, you can install a third-party app like AdNabu, which pushes the changes instantly to your e-commerce store. That way, you don’t have to make changes to your Merchant Center individually, giving you a hassle-free experience.
With AdNabu, metafields can help you by providing:
1. Additional Product Information: Enhances search accuracy and completeness of product data making it more attractive to potential customers on Google Shopping and other marketplaces.
2. Improved Product Categorization: Accurate categorization increases the visibility of your products to the right audience and improves chances of attracting ideal customers.
3. Enhanced Product Listings: Makes products stand out amongst competitors.
4. Customized Pricing & Promotions: Helps create targeted promotions.
To map the metafields to your Merchant Center, follow the steps below:
- In the app, go to Settings. Then, locate Metafields.
- Enable the Metafields.
- Now, click Add Metafield and fill in the fields. Once done, click Submit.
- Ensure you have clicked Save after you have added the fields. Your metafields will be ready and get instantly pushed to your Google Merchant Center.
- To edit or delete a metafield, click on the three dots.
What’s The Difference Between Metafields & Metaobjects?
You’re already familiar with Metafields. While exploring the Shopify admin, you must have encountered metaobjects. They are used to add extra structured information (objects) that is displayed on your online store. They are retrievable and can be edited. So, what’s the difference between the two?
Metafields are not synonymous with metaobjects, as the two serve different purposes. Here are their differences:
Metafields are custom fields that can be added to different sections of your store to either display on your storefront or use internally. Metaobjects, on the other hand, can have several metafields added (referenced) to it. They are more complex in nature than metafields.
While metafields are created separately, metaobjects are created once and can be referenced several times to different objects.
Metaobjects are built from scratch meanwhile, metafields are inserted in an existing resource like products, pages, etc.
Metafields are a powerful tool that can transform your store, and you can benefit from them, as will your customers. Thanks to the intervention of Shopify 2.0, you don’t require any coding knowledge or lug a coder around to add them separately. They are fairly easy to add and display in storefronts.
Make the best use of metafields to make your Shopify store more unique and appealing.
Why is my metafield not showing up on Shopify?
Metafields don’t show up when you’re using a theme that is not compatible with the text field. To resolve this, check your code in the theme file and edit product.liquid in it. Also, check if the theme is part of the new Shopify 2.0 upgrade. To access, go to the Sections directory.
Can a Shopify metafield be mapped to any attribute in Google Merchant Center?
Yes, it is possible to map the metafield to any attribute in Google Merchant Center. Such as, SKU is used as MPN on Google Merchant Center. To map, you can get the AdNabu app, which lets you map the metafields quickly to your Merchant Center.
To do this, install the app. Go to the app’s settings > Metafields. Enable the Metafields and add them by filling in the namespace and key name.
How many metafields can you have in Shopify?
With a variety of metafields, you can add up to 200 of each resource type to your Shopify store, either for internal tracking or displaying on the online store.
What are metafield lists?
Metafield lists lets you store data about your store to make it more unique. These lists are mostly used for enhancing various aspects of your Shopify store, such as displaying products that match up with the customer’s selection or facilitating advanced filtering options for a better shopping experience.
Can metafields improve the SEO of an online store?
Yes, metafields improve search rankings or ad rank based on metafield data and corresponding search queries. Customers are able to look for products by filtering out what’s important, increasing the likelihood of choosing your store.
What is the maximum length of metafield values in Shopify?
The value is limited to 65,535 characters, the same as a MySQL TEXT column. Keys are limited to 30 characters, and the namespace is limited to 20 characters.
How do I export metafield values from Shopify?
Exporting metafield values from Shopify can be done using third-party apps. Try AdNabu, which pushes the products and variants values from your Shopify admin to Google Merchant Center without individually pushing the metafields. The process is smooth as after you create your metafield, it gets submitted and tracked by the Merchant Center.
Is there any limitation on Shopify metafields to be integrated with the product feed?
The AdNabu app currently focuses on incorporating the metafields at products and variants level. It does not map orders, customers, collections, etc. This exclusion is intentional as the focus is on product and variant details within the product feed.