{"id":241924,"date":"2025-10-21T13:41:56","date_gmt":"2025-10-21T13:41:56","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/greensites\/"},"modified":"2025-10-21T14:05:29","modified_gmt":"2025-10-21T14:05:29","slug":"greensites","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/greensites\/","author":16328114,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0","stable_tag":"trunk","tested":"6.8.5","requires":"6.3","requires_php":"7.4","requires_plugins":null,"header_name":"Greensites","header_author":"Greenpow Computing O\u00dc","header_description":"Estimate your website\u2019s carbon footprint and offset it via GreenPow.","assets_banners_color":"","last_updated":"2025-10-21 14:05:29","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/greenpow.io","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":203,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"devgreenpow","date":"2025-10-21 14:11:55"}},"upgrade_notice":{"1.0":"<ul>\n<li>Initial Release.<\/li>\n<\/ul>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3381973,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3381973,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"The Greensites dashboard includes four cards:","2":"The Greensites activation form is straightforward:\nYou simply need to create or log in to your Greenpow account, purchase the Greensite plugin, and enter the provided token into the Greensites form."}},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[249509,249508],"plugin_business_model":[],"class_list":["post-241924","plugin","type-plugin","status-closed","hentry","plugin_contributors-devgreenpow","plugin_contributors-etorres","plugin_committers-devgreenpow"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/greensites.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/greensites\/assets\/screenshot-1.png?rev=3381973","caption":"The Greensites dashboard includes four cards:"},{"src":"https:\/\/ps.w.org\/greensites\/assets\/screenshot-2.png?rev=3381973","caption":"The Greensites activation form is straightforward:\nYou simply need to create or log in to your Greenpow account, purchase the Greensite plugin, and enter the provided token into the Greensites form."}],"raw_content":"<!--section=description-->\n<p>Estimate your website\u2019s carbon footprint and offset it via GreenPow.<\/p>\n\n<h3>how it works<\/h3>\n\n<p>Using CO2.js, GreenSites is responsible for collecting all the necessary information to calculate the carbon footprint of your WordPress sites.<\/p>\n\n<ol>\n<li>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.<\/li>\n<li>GreenSites installs a tracker that increments each time a user visits the page, updating the greensites_visitors_count table.<\/li>\n<li>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.<\/li>\n<li>When the plugin is activated, a cron task is also created, which stores the monthly calculation in the greensites_monthly_report_event table.<\/li>\n<\/ol>\n\n<h3>Dependency: CO2.js<\/h3>\n\n<p>This plugin includes the CO2.js library created by The Greenweb Foundation, licensed under the <strong>Apache License, Version 2.0<\/strong>.<\/p>\n\n<ul>\n<li>The original version has been included, with its NOTICE file intact.  <\/li>\n<li>The full license text is available in the <code>LICENSE<\/code> file at the root of the plugin.  <\/li>\n<li>Original repository: https:\/\/github.com\/thegreenwebfoundation\/co2.js<\/li>\n<\/ul>\n\n<h3>Third-Party Licenses<\/h3>\n\n<ul>\n<li>CO2.js \u2013 Apache License 2.0 (includes on \/js\/greenweb\/LICENSE)<\/li>\n<\/ul>\n\n<h3>External Services (Greenpow API \u2013 Authentication and Report.)<\/h3>\n\n<p>Integration with the Greenpow API<\/p>\n\n<p>This plugin connects with the private Greenpow API, developed by the same company behind this plugin: https:\/\/greenpow.io.<\/p>\n\n<p>Token validation\nWhen 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:<\/p>\n\n<p>POST https:\/\/api.greenpow.cloud\/api\/greensites\/validate-token<\/p>\n\n<p>During the initial setup, the plugin will request the token from the user.<\/p>\n\n<p>On every subsequent use, the plugin will continue validating the token using the same endpoint to ensure authenticity and valid access.<\/p>\n\n<p>Carbon footprint report\nThe plugin also uses the following Greenpow API endpoint:<\/p>\n\n<p>POST https:\/\/api.greenpow.cloud\/api\/greensites\/carbon-report<\/p>\n\n<p>This is where carbon footprint reports are sent so Greenpow can run its calculations and issue an official offset certificate.<\/p>\n\n<h3>Data Sent to the API<\/h3>\n\n<ol>\n<li><p>greensites_validate_token()<\/p>\n\n<ul>\n<li>Data sent:\n\n<ul>\n<li>domain \u2192 the current WordPress site domain.<\/li>\n<li>token \u2192 the site\u2019s GreenSites authentication token.<\/li>\n<\/ul><\/li>\n<li>When:\n\n<ul>\n<li>Every time the plugin needs to validate the token stored in the database or received via POST.<\/li>\n<\/ul><\/li>\n<li>Why:\n\n<ul>\n<li>To confirm that the token is valid and authorized for API usage.<\/li>\n<\/ul><\/li>\n<li>Endpoint:\n\n<ul>\n<li>https:\/\/api.greenpow.cloud\/api\/greensites\/validate-token<\/li>\n<\/ul><\/li>\n<\/ul><\/li>\n<li><p>greensites_generate_and_send_monthly_report()<\/p>\n\n<ul>\n<li>Data sent:\n\n<ul>\n<li>month \u2192 the previous month (first day as YYYY-MM-DD).<\/li>\n<li>visits \u2192 total visits registered in the WordPress visitors counter table.<\/li>\n<li>carbon_grams \u2192 estimated CO\u2082 emissions for the month.<\/li>\n<li>compensation_usd \u2192 calculated monetary compensation required to offset emissions.<\/li>\n<li>token \u2192 the site\u2019s GreenSites authentication token.<\/li>\n<li>domain \u2192 the current WordPress site domain.<\/li>\n<\/ul><\/li>\n<li>When:\n\n<ul>\n<li>Automatically after a new monthly report is generated (first day of the following month).<\/li>\n<\/ul><\/li>\n<li>Why:\n\n<ul>\n<li>To report monthly visit and CO\u2082 data to GreenPow for tracking and carbon offset calculation.<\/li>\n<\/ul><\/li>\n<li>Endpoint:\n\n<ul>\n<li>https:\/\/api.greenpow.cloud\/api\/greensites\/carbon-report<\/li>\n<\/ul><\/li>\n<\/ul><\/li>\n<\/ol>\n\n<h3>Purpose of Data Transmission<\/h3>\n\n<p>The plugin sends only the necessary data for:\n- Token validation (authentication).\n- Monthly reporting of visits and carbon footprint.<\/p>\n\n<h3>Terms of Service and Privacy Policies<\/h3>\n\n<ul>\n<li>GreenPow Terms of Service: https:\/\/greenpow.network\/terms<\/li>\n<li>GreenPow Privacy Policy: https:\/\/greenpow.network\/privacy<\/li>\n<\/ul>\n\n<h3>External Services (CO2.js \u2013 Green Hosting Checks)<\/h3>\n\n<p>This plugin\/library uses the public APIs operated by <strong>The Green Web Foundation<\/strong> <em>only<\/em> when the hosting check feature is called.<\/p>\n\n<p>Service:\n- https:\/\/api.thegreenwebfoundation.org<\/p>\n\n<h3>When Calls Happen<\/h3>\n\n<ul>\n<li><strong>Only when <code>hosting.check(...)<\/code> is invoked<\/strong> (directly or via wrappers <code>b.check<\/code> \/ <code>v.check<\/code>):\n\n<ul>\n<li>If you pass a <strong>single domain<\/strong> (string), the code performs a GET request to:<\/li>\n<li><code>https:\/\/api.thegreenwebfoundation.org\/greencheck\/{domain}<\/code><\/li>\n<li>If you pass <strong>multiple domains<\/strong> (array), the code performs a GET request to:<\/li>\n<li><code>https:\/\/api.thegreenwebfoundation.org\/v2\/greencheckmulti\/{jsonEncodedArray}<\/code><\/li>\n<\/ul><\/li>\n<\/ul>\n\n<blockquote>\n  <p>Note: Other CO2.js methods (<code>perByte<\/code>, <code>perVisit<\/code>, etc.) run locally and <strong>do not<\/strong> contact external APIs.<\/p>\n<\/blockquote>\n\n<h3>Data Sent<\/h3>\n\n<ul>\n<li>For <strong>single-domain check<\/strong>:\n\n<ul>\n<li><code>domain<\/code> \u2192 included in the URL path (no request body).<\/li>\n<\/ul><\/li>\n<li>For <strong>multi-domain check<\/strong>:\n\n<ul>\n<li><code>domains[]<\/code> \u2192 the array of domains is JSON-encoded and included in the URL path as part of the endpoint.<\/li>\n<\/ul><\/li>\n<li><strong>No tokens, cookies, or personal identifiers<\/strong> are added by this code.<\/li>\n<\/ul>\n\n<h3>Why the Data Is Sent<\/h3>\n\n<ul>\n<li>To query The Green Web Foundation\u2019s dataset and determine if a domain is served by a verified green hosting provider.<\/li>\n<li>The response contains a boolean flag (e.g., <code>green: true\/false<\/code>) and related metadata used to label the domain as \u201cgreen\u201d or not.<\/li>\n<\/ul>\n\n<h3>Endpoints (Documentation)<\/h3>\n\n<ul>\n<li>Greencheck API (single domain): https:\/\/developers.thegreenwebfoundation.org\/api\/greencheck\/v3\/check-single-domain\/<\/li>\n<li>Developer portal (APIs overview): https:\/\/developers.thegreenwebfoundation.org\/<\/li>\n<\/ul>\n\n<h3>Terms of Service and Privacy Policies<\/h3>\n\n<ul>\n<li>Privacy Policy (The Green Web Foundation): https:\/\/www.thegreenwebfoundation.org\/privacy-statement\/<\/li>\n<li>Notes on Terms:\n\n<ul>\n<li>As of this writing, The Green Web Foundation does not publish a dedicated Greencheck API \u201cTerms of Service\u201d 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.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h3>Additional Notes<\/h3>\n\n<ul>\n<li>Requests use HTTP <strong>GET<\/strong> and include only the queried domain name(s).<\/li>\n<li>You are responsible for obtaining consent before transmitting any domain names that could be considered personal data in your jurisdiction.<\/li>\n<li>CO2 intensity data tables embedded in CO2.js are local constants; looking up grid intensities <strong>does not<\/strong> trigger network calls.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>greensites<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20do%20i%20activate%20my%20greensites%20plugin%3F'><h3>How do I activate my Greensites plugin?<\/h3><\/dt>\n<dd><p>Register or log in to your Greenpow account and purchase your plugin. Follow the prompts to obtain your token.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial Release.<\/li>\n<\/ul>","raw_excerpt":"Measure your WordPress site\u2019s carbon footprint per visit and offset emissions with GreenPow integration.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/241924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=241924"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/devgreenpow"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=241924"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=241924"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=241924"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=241924"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=241924"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=241924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}