Link & Calculate

Send your users directly to the calculation result if all input parameters of a calculator are known. If you already know the carbon emissions in tonnes, you can link directly to the myclimate offsetting cart.

To do so, send a POST request to the base URL of the calculator.

Offset using input parameters of a specific calculator

If you know all input parameters of a calculator, you can add a button which takes the user directly to the calculation result.

Example:

HTML
<form method="post" action="https://co2.myclimate.org/en/flight_calculators">
  <input type="hidden" name="flight_calculator[from]"          value="ZRH">
  <input type="hidden" name="flight_calculator[via]"           value="FRA">
  <input type="hidden" name="flight_calculator[to]"            value="LAX">
  <input type="hidden" name="flight_calculator[roundtrip]"     value="true">
  <input type="hidden" name="flight_calculator[passengers]"    value="2">
  <input type="hidden" name="flight_calculator[flight_class]"  value="economy">
  <button type="submit">Offset this flight with myclimate</button>
</form>

Offset known carbon emissions

It is also possible to offset a specific amount of carbon emissions if no myclimate calculator is available for the specific use case. Otherwise using a specific calculator (such as the flight calculator) is preferred, as the customer receives more detailed information in the offsetting confirmation.

To offset 1.6 tonnes of carbon emissions, use the following HTML code:

HTML
<form method="post" action="https://co2.myclimate.org/en/contribution_calculators">
  <input type="hidden" name="contribution_calculator[emission_in_tons]" value="1.6" />
  <input type="submit" />
</form>

The user flow looks like the following:

User flow Link & Calculate

Reset cart

myclimate stores the current state of the cart in the user's session. If a user uses "Link & Calculate" multiple times, the previous items in the cart are not deleted. If you would like to delete all items in the cart and only show the current item, use reset_cart_and_create at the end of the URL.

Example:

HTML
<form method="post" action="https://co2.myclimate.org/en/contribution_calculators/reset_cart_and_create">
  <input type="hidden" name="contribution_calculator[emission_in_tons]" value="1.6" />
  <input type="submit" />
</form>

Tracking

It is also possible to add tracking parameters to those links so that we can track the offsets back to you.

Use the following HTML for that:

HTML
<form method="post" action="https://co2.myclimate.org/en/contribution_calculators">
  <input type="hidden" name="contribution_calculator[emission_in_tons]" value="1.6" />
  <input type="hidden" name="ps" value="test-ps-1" />
  <input type="hidden" name="psuid" value="customerId-1" />
  <input type="submit" />
</form>

Please contact us to define a ps you can use for this purpose.