Loading...

Your privacy choices

Google Analytics 4 measures site visits and Google Ads measures advertising clicks and checkout completions, only for the purposes you accept. Neither is required to buy. Necessary checkout services remain available.

Your privacy choices

Google Analytics 4 measures site visits and Google Ads measures advertising clicks and checkout completions, only for the purposes you accept. Neither is required to buy. Necessary checkout services remain available.

These optional Google services may set audience or advertising cookies after your acceptance. Analytics and advertising are separate choices. Acceptance and refusal are remembered in this browser for a fixed 180 days, without extending the period when read. You can withdraw or change your choices at any time using Privacy choices in the footer. Withdrawal removes optional first-party Google cookies and reloads the page if Google has already loaded (using session storage in this tab if persistent storage refuses the withdrawal; a blank page opens only if both stores cannot safely record the withdrawal and a stale approval remains). Checkout, external demos, videos, support and newsletter services have their own privacy information.

Calculate a price

Calculate distance-based delivery or travel prices

Configure address fields and Google Maps settings, insert a distance value and test travel-based pricing with known routes.

Updated v10.6.772 min read
On this page
Where to find it

Form settings → Google Maps browser key; calculation editor → Add a distance

Before you start

Use a Google Maps project with billing and the services required by your installed integration. Configure key restrictions for the real domain. An address label alone is not enough: identify address fields with Type of information.

Step-by-step instructions

  1. Create the departure and destination fields. Set their information types to the corresponding address information and collect enough detail to identify each location.

  2. Enter the Google Maps browser key in this form’s settings. Select the available distance mode and units appropriate to your rate; road and straight-line distances are different quantities.

  3. Open the price calculation and use Add a distance to choose addresses and distance or travel-time information. Keep the token generated by the editor rather than typing IDs manually.

  4. Build the rule as a base fee plus distance multiplied by your rate. For example, a 10 base fee plus 2.5 per kilometre gives 60 for 20 km, before other charges.

Check the result

Try two known addresses, a changed destination and an incomplete address. Verify the returned unit and that an unavailable route does not silently produce an accepted free quote.

If it does not work

Check the browser console for the exact Maps error, API enablement, billing, domain restrictions and quotas. If Add a distance is missing, check the form key and the address field information types.