How to Display Your Environmental Impact with GoodAPI Metafields

How to Display Your Environmental Impact with GoodAPI Metafields

If your brand is committed to sustainability, you can automatically display your real-time environmental impact across your Shopify store using GoodAPI metafields. These metafields update automatically and can be surfaced anywhere on your store — from your homepage to order confirmation emails.


The GoodAPI Metafields


GoodAPI provides three shop-level metafields that update automatically as your impact grows:

  • goodapi.total_number_trees — The total number of trees pledged on behalf of your customers
  • goodapi.total_number_kelp — The total number of kelp fronds pledged
  • goodapi.total_number_bottles — The total number of ocean-bound plastic bottles collected


Step 1: Create Metafield Definitions


Before you can use these metafields in your theme, you need to create a definition for each one.

  1. From your Shopify admin, go to Settings > Metafields > Shop > Unstructured Metafields
  2. Find the unstructured metafield (e.g. goodapi.total_number_trees) and click on it to create a definition
  3. Give it a clear name (e.g. "Trees Pledged"), set the type to Integer, and save
  4. Repeat for total_number_kelp and total_number_bottles

Once definitions are created, these metafields become available as dynamic sources throughout your theme editor — no coding required.



Step 2: Display on Your Online Store


You can add your impact numbers to any page — homepage, product pages, about page, etc.

  1. Go to Online Store > Themes and click Customize
  2. Navigate to the page or template you want to edit
  3. Add or select a text block/section
  4. Click the Connect dynamic source icon (🔗) next to the text field
  5. Search for and select the metafield (e.g. "Trees Pledged")
  6. Save your changes

Pro tip: Consider adding an impact counter section to your homepage or a dedicated sustainability page to showcase all three metrics together.



Step 3: Include Impact in Order Confirmation Emails


Showing customers their personal contribution at the moment of purchase is a powerful trust-builder.

  1. Go to Settings > Notifications and select Order confirmation
  2. Click Edit code
  3. Add the following Liquid snippet where you'd like the impact to appear:
<p>Thanks to your order, we've contributed to:</p>
<ul>
<li>🌳 {{ shop.metafields.goodapi.total_number_trees }} trees planted</li>
<li>🌿 {{ shop.metafields.goodapi.total_number_kelp }} kelp fronds restored</li>
<li>♻️ {{ shop.metafields.goodapi.total_number_bottles }} ocean-bound plastic bottles collected</li>
</ul>



Step 4: Other Places to Use These Metafields


Location

How to Use

Homepage banner

Connect as dynamic source in theme editor

Product pages

Add a sustainability block using dynamic sources

Footer

Add a text block with dynamic source connected

Packing slips

Add Liquid snippet to the packing slip template in Notifications

Abandoned cart emails

Remind customers of their potential impact to encourage completion

Thank you / Order status page

Add via Settings > Checkout > Order status page additional scripts



Tips for Maximizing Impact

  • Keep it prominent — Place your impact metrics above the fold on your homepage so visitors see them immediately.
  • Use compelling copy — Pair the numbers with context, e.g. "Together, we've planted 13,000+ trees!"
  • Update your marketing — Reference these live numbers in social media captions and email campaigns by pulling the current values.
  • Celebrate milestones — Set up a Shopify Flow automation to notify your team when key thresholds are hit (e.g. every 1,000 trees).


This is a great way to build trust and turn your sustainability commitment into a visible, living part of your brand story!

Updated on: 17/04/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!