Empower your website with real-time carbon footprint calculations. Our lightweight, customizable widget integrates seamlessly into any platform.
Get up and running in under 5 minutes
Add the widget script to your HTML page before the closing body tag.
<script src="https://ecosync.dev/widget/eco-sync-widget.js"></script>
Place the custom element where you want the calculator to appear.
<eco-sync-widget
data-api-key="es_live_your_key_here"
data-api-base="https://ecosync.dev/"
data-origin="Berlin, Germany"
data-destination="Munich, Germany"
data-weight-kg="2.5"
></eco-sync-widget>
Configure the widget with your API key and desired settings. That's it!
Built for developers, designed for users
Instant CO₂ emission calculations using industry-standard methodologies including GLEC Framework and ISO 14064.
API key authentication, secure data transmission, and built-in error handling ensure reliable operation.
Perfectly adapted for all devices - from desktop to mobile, ensuring a consistent experience.
Shadow DOM encapsulation ensures the widget won't conflict with your existing styles.
Optimized for performance with minimal impact on page load times.
Supports international locations and multiple transport modes (road, sea, air, rail).
Comprehensive attribute reference
| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
data-api-key |
String | Required | - | Your Eco-Sync API authentication key |
data-api-base |
String | Optional | https://ecosync.dev/ |
Base URL for API requests |
data-origin |
String | Required | - | Starting location (City, Country format) |
data-destination |
String | Required | - | Destination location (City, Country format) |
data-weight-kg |
Number | Optional | 1 |
Shipment weight in kilograms |
data-transport-mode |
String | Optional | road |
Transport mode: road, sea, air, rail |
data-vehicle-type |
String | Optional | truck_diesel |
Vehicle type: truck_diesel, truck_electric, cargo_ship, cargo_plane |
data-standard |
String | Optional | both |
Calculation standard: glec, iso, both |
Understanding the calculation results
{
"distance_km": 584.5,
"co2_kg": 175.35,
"offset_price": 3.51,
"methodology": "GLEC Framework v3.0 + ISO 14064-1:2018",
"standards": ["GLEC", "ISO 14064"],
"data_quality": "Medium",
"glec_calculation": {
"co2_emissions_kg": 0.179,
"ch4_emissions_kg": 0.005,
"n2o_emissions_kg": 0.003,
"total_co2e_kg": 0.189,
"methodology": "GLEC Framework v3.0",
"well_to_tank_kg": 0.024,
"tank_to_wheel_kg": 0.164,
"uncertainty_percentage": 15,
"data_quality": "Medium"
},
"iso14064_calculation": {
"co2_emissions_kg": 0.143,
"ch4_emissions_kg": 0.004,
"n2o_emissions_kg": 0.003,
"total_co2e_kg": 0.151,
"standard": "ISO 14064-1:2018",
"scope": "Scope 3",
"category": "Business Travel",
"activity_data": 1.592,
"emission_factor": 0.095,
"uncertainty_percentage": 10,
"data_quality": "Medium",
"reduction_achieved_percentage": 4.76
},
"compliance_report": {
"organization_id": "ECO-SYNC-CLIENT",
"reporting_period": "2024-Q1",
"compliance": {
"csrd_status": {
"required": true,
"reporting_year": 2025,
"double_material": true,
"esrs_standards": [
"ESRS E1 - Climate Change Mitigation",
"ESRS E2 - Climate Change Adaptation"
]
}
},
"risk_assessment": {
"non_compliance_risk": "Low",
"financial_impact": 0,
"reputational_impact": "Low"
}
}
}
{
"distance_km": 289.6,
"co2_kg": 189.30,
"offset_price": 2839.50,
"methodology": "GLEC Framework v3.0 + ISO 14064-1:2018",
"standards": ["GLEC", "ISO 14064"],
"data_quality": "Medium",
"glec_calculation": {
"total_co2e_kg": 0.189,
"well_to_tank_kg": 0.024, // WTT: fuel production & transport
"tank_to_wheel_kg": 0.164, // TTW: vehicle tailpipe emissions
"co2_emissions_kg": 0.179,
"ch4_emissions_kg": 0.005,
"n2o_emissions_kg": 0.003,
"uncertainty_percentage": 15
},
"iso14064_calculation": {
"total_co2e_kg": 0.151,
"scope": "Scope 3",
"activity_data": 1.592,
"emission_factor": 0.095,
"reduction_achieved_percentage": 4.76
}
}
The widget emits custom events that you can listen to:
// Listen for calculation completion
document.addEventListener('eco-sync-calculated', function(event) {
const result = event.detail;
console.log('CO2 emissions:', result.co2_kg, 'kg');
console.log('Distance:', result.distance_km, 'km');
console.log('Offset cost:', result.offset_price, 'EUR');
// You can now use this data for analytics, logging, or UI updates
});
Try the widget in action
Waiting for calculation...
We're here to help you succeed