Skip to content

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.

GoodAPI provides four 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
  • goodapi.total_pounds_plastic_removed — The total pounds of plastic removed (calculated as bottles / 22)

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, total_number_bottles, and total_pounds_plastic_removed Once definitions are created, these metafields become available as dynamic sources throughout your theme editor — no coding required.

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 four metrics together.

Step 3: Include Impact in Order Confirmation Emails

Section titled “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>
<li>⚖️ {{ shop.metafields.goodapi.total_pounds_plastic_removed }} pounds of plastic removed</li>
</ul>

Step 4: Other Places to Use These Metafields

Section titled “Step 4: Other Places to Use These Metafields”
LocationHow to Use
Homepage bannerConnect as dynamic source in theme editor
Product pagesAdd a sustainability block using dynamic sources
FooterAdd a text block with dynamic source connected
Packing slipsAdd Liquid snippet to the packing slip template in Notifications
Abandoned cart emailsRemind customers of their potential impact to encourage completion
Thank you / Order status pageAdd via Settings > Checkout > Order status page additional scripts
  • 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!