Estimate your website』s carbon footprint and offset it via GreenPow.
how it works
Using CO2.js, GreenSites is responsible for collecting all the necessary information to calculate the carbon footprint of your WordPress sites.
- When the GreenSites plugin is activated, our bot will visit your homepage, retrieve the number of bytes used per visit, and store this data in the database.
- GreenSites installs a tracker that increments each time a user visits the page, updating the greensites_visitors_count table.
- Using the collected data and the CO2.js API, we calculate the CO2 emissions per visit as well as the total emissions for all visits in the month.
- When the plugin is activated, a cron task is also created, which stores the monthly calculation in the greensites_monthly_report_event table.
Dependency: CO2.js
This plugin includes the CO2.js library created by The Greenweb Foundation, licensed under the Apache License, Version 2.0.
- The original version has been included, with its NOTICE file intact.
- The full license text is available in the
LICENSEfile at the root of the plugin. - Original repository: https://github.com/thegreenwebfoundation/co2.js
Third-Party Licenses
- CO2.js – Apache License 2.0 (includes on /js/greenweb/LICENSE)
External Services (Greenpow API – Authentication and Report.)
Integration with the Greenpow API
This plugin connects with the private Greenpow API, developed by the same company behind this plugin: https://greenpow.io.
Token validation
When a user purchases a subscription on our platform, they receive a Greensites Token. The plugin requires this token to work properly and validates it through the following endpoint:
POST https://api.greenpow.cloud/api/greensites/validate-token
During the initial setup, the plugin will request the token from the user.
On every subsequent use, the plugin will continue validating the token using the same endpoint to ensure authenticity and valid access.
Carbon footprint report
The plugin also uses the following Greenpow API endpoint:
POST https://api.greenpow.cloud/api/greensites/carbon-report
This is where carbon footprint reports are sent so Greenpow can run its calculations and issue an official offset certificate.
Data Sent to the API
-
greensites_validate_token()
- Data sent:
- domain the current WordPress site domain.
- token the site』s GreenSites authentication token.
- When:
- Every time the plugin needs to validate the token stored in the database or received via POST.
- Why:
- To confirm that the token is valid and authorized for API usage.
- Endpoint:
- https://api.greenpow.cloud/api/greensites/validate-token
- Data sent:
-
greensites_generate_and_send_monthly_report()
- Data sent:
- month the previous month (first day as YYYY-MM-DD).
- visits total visits registered in the WordPress visitors counter table.
- carbon_grams estimated CO₂ emissions for the month.
- compensation_usd calculated monetary compensation required to offset emissions.
- token the site』s GreenSites authentication token.
- domain the current WordPress site domain.
- When:
- Automatically after a new monthly report is generated (first day of the following month).
- Why:
- To report monthly visit and CO₂ data to GreenPow for tracking and carbon offset calculation.
- Endpoint:
- https://api.greenpow.cloud/api/greensites/carbon-report
- Data sent:
Purpose of Data Transmission
The plugin sends only the necessary data for:
– Token validation (authentication).
– Monthly reporting of visits and carbon footprint.
Terms of Service and Privacy Policies
- GreenPow Terms of Service: https://greenpow.network/terms
- GreenPow Privacy Policy: https://greenpow.network/privacy
External Services (CO2.js – Green Hosting Checks)
This plugin/library uses the public APIs operated by The Green Web Foundation only when the hosting check feature is called.
Service:
– https://api.thegreenwebfoundation.org
When Calls Happen
- Only when
hosting.check(...)is invoked (directly or via wrappersb.check/v.check):- If you pass a single domain (string), the code performs a GET request to:
https://api.thegreenwebfoundation.org/greencheck/{domain}- If you pass multiple domains (array), the code performs a GET request to:
https://api.thegreenwebfoundation.org/v2/greencheckmulti/{jsonEncodedArray}
Note: Other CO2.js methods (
perByte,perVisit, etc.) run locally and do not contact external APIs.
Data Sent
- For single-domain check:
domainincluded in the URL path (no request body).
- For multi-domain check:
domains[]the array of domains is JSON-encoded and included in the URL path as part of the endpoint.
- No tokens, cookies, or personal identifiers are added by this code.
Why the Data Is Sent
- To query The Green Web Foundation』s dataset and determine if a domain is served by a verified green hosting provider.
- The response contains a boolean flag (e.g.,
green: true/false) and related metadata used to label the domain as 「green」 or not.
Endpoints (Documentation)
- Greencheck API (single domain): https://developers.thegreenwebfoundation.org/api/greencheck/v3/check-single-domain/
- Developer portal (APIs overview): https://developers.thegreenwebfoundation.org/
Terms of Service and Privacy Policies
- Privacy Policy (The Green Web Foundation): https://www.thegreenwebfoundation.org/privacy-statement/
- Notes on Terms:
- As of this writing, The Green Web Foundation does not publish a dedicated Greencheck API 「Terms of Service」 page. Usage guidance and constraints are covered in the developer docs above and site-wide policies. If formal Terms are introduced later, link them here.
Additional Notes
- Requests use HTTP GET and include only the queried domain name(s).
- You are responsible for obtaining consent before transmitting any domain names that could be considered personal data in your jurisdiction.
- CO2 intensity data tables embedded in CO2.js are local constants; looking up grid intensities does not trigger network calls.






