Skip to content

How to Display Your Impact with GoodAPI Metafields

You can automatically display your real-time environmental and social 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 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)
  • goodapi.donations_total_amount — The total amount donated through GoodAPI (shop currency)

If you have not set up donations yet, see Setting Up Donations.

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 and set the correct type, then save:
    • Environmental totals (total_number_trees, total_number_kelp, total_number_bottles, total_pounds_plastic_removed) → Integer
    • Donations total (donations_total_amount) → Decimal
  4. Repeat for each metafield you want to display 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” or “Donations Total”)
  6. Save your changes Pro tip: Consider adding an impact counter section to your homepage or a dedicated impact page to showcase environmental and donation metrics together.

Step 3: Include Impact in Order Confirmation Emails

Section titled “Step 3: Include Impact in Order Confirmation Emails”

Showing customers their 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 (remove any lines for metrics you do not use):
<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>
<li>{{ shop.metafields.goodapi.donations_total_amount }} donated</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 an impact 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 and donated over $5,000!”
  • 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 or every $1,000 donated).

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