Duplicate requests
-
Hello,
I am experiencing duplicate requests by using the plugin (some times 6 API hits per request), pushing the API hits pretty high, and actually incurring charges this month on Google Console.
E.g. I had 25058 hits to /maps/api/distancematrix/json?mode=car&language=en-GB&units=imperial&origins=REDACTED_ORIGIN_ADDRESS&destinations=%2C+&key=REDACTED_KEY
The first issue is mode=car, this is not a valid travel mode, fortunately it defaults to mode=driving, so there’s no impact on the request, but needs changing.
https://developers.google.com/maps/documentation/distance-matrix/intro#travel_modesSeconly, the destination parameter in most requests is a prepended comma (%2C), and in the 2 most repeated requests I have, this is actually the only value of that parameter. Could it be possible that you have a retry logic or an if-else statement that repeats the request if no destination address is added?
https://developers.google.com/maps/documentation/distance-matrix/web-service-best-practices#BuildingURLsCan we ensure there is a valid address (not just a space or comma) before pinging off to Google?
Thanks for the plugin ??
Joe
- The topic ‘Duplicate requests’ is closed to new replies.