New home › Forums › Pro Add-on › Pre-sale questions › High number of requests to API key – Too costly
- This topic has 10 replies, 2 voices, and was last updated 1 year, 1 month ago by volcan.
-
AuthorPosts
-
August 4, 2022 at 10:00 pm #74282volcanParticipant
Hi!
So we’ve bought the WP Gmaps Pro Add-on a couple months ago and created a map on our client website showing a couple hundred locations in Canada
Carte et liste des microbrasseries
Looking at our console.cloud.google.com/billing interface, I realize the API key we’ve set up on this website cost us over 100$ after credits last month and nearly as much the month before.
I went to Google analytics and saw less than 100 visitors per day so I’m pretty sure that the problem is the amount of locations on the map. It’s like each pointer sends an individual request to the Gmaps API which ends up costing us much more money than it should.
My question is, would the Gold Add-On solve this issue with the Marker Clustering option? Or should we’d proceeded differently in the way we’ve created the map in the first place? How can we reduce the number of API requests?
Any suggestion would be much appreciated.
Thanks!
August 5, 2022 at 10:20 am #74291StevenModeratorHi @volcan,
Thank you so much for getting in touch, we really appreciate your time.
Kindly note, that the markers added to your map won’t add additional requests as all this information is stored in your database and is simply pulled from there.
To clarify, generally, a request will be sent every time the map is loaded, so if users navigate to the map page and away but come back to the map page later, each time will be a request.
In addition to this, requests can be done when users do a Store Locator search, so for instance, multiple requests will be sent to the Places API when typing in an address.
There is also the Geocoding API which gets triggered in order to place a marker on the map using an entered address but then also if an import is done with Geocoding enabled, each marker will count as a request then.
With the above said, if you navigate to the Metrics tab(https://console.cloud.google.com/google/maps-apis/metrics?referrer=search&project=) in your Google console region, you should be able to see a more detailed breakdown per API used.
August 5, 2022 at 2:56 pm #74293volcanParticipantHi,
Thank you very much for your detailed answer. I was able to find the metrics report and filter by credential but I still don’t understand what could create so many request with so few visitors.
Could you maybe take a look at the screenshots I took from the metrics report? It says 861 Maps Javascript API were sent on July 18th 2022 and if I look at the Google Analytics report for that particular page on that day, I see a total of 7 views and 5 users.
Looking at the developer console, I can see a number of images requests like this one every time the map loads or gets moved around but even then, I don’t think it could add up to 861 requests with 7 users averaging 1mn34 on the page :
https://maps.googleapis.com/maps/vt?pb=!1m5!1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mZ8cC53OjIscy50OjY1fHMuZTpsLnQuc3xwLnY6b2ZmLHMudDo2NnxzLmU6Z3xwLmM6I2ZmM2E0NzYyLHMudDo2fHMuZTpnfHAuYzojZmY2Mjk5YWEscy50OjZ8cy5lOmx8cC5jOiNmZmZmZmZmZixzLnQ6NnxzLmU6bC50LmZ8cC5jOiNmZjRlNmQ3MA!4e0!23i1379903&key=AIzaSyBHQmkQgFKsMlPb912F4IIsPb_-shxOySs&token=94612
August 5, 2022 at 2:57 pm #74294volcanParticipantSorry forgot to add the screenshot
Attachments:
You must be logged in to view attached files.August 5, 2022 at 3:02 pm #74297StevenModeratorHi @volcan,
Could I kindly ask if you would be able to provide us with a link to your website as well?
August 5, 2022 at 4:28 pm #74301volcanParticipantSure! Sorry I was sure I’d sent the link in my first post but it seems I’ve sent the page title instead!
Here it is :
Carte et liste des microbrasseries
August 5, 2022 at 4:30 pm #74302volcanParticipantOh I see what’s happening, this comment section is replacing my link with the page title automatically.. Would using quotes work? :
“https://bieresdemicroduquebec.ca/les-microbrasseries/carte-et-liste-des-microbrasseries/”
If not maybe removing the http :
bieresdemicroduquebec.ca/les-microbrasseries/carte-et-liste-des-microbrasseries/
- This reply was modified 1 year, 1 month ago by volcan.
August 8, 2022 at 9:12 am #74311StevenModeratorThis reply has been marked as private.August 8, 2022 at 4:08 pm #74328volcanParticipantThis reply has been marked as private.August 10, 2022 at 7:14 am #74331StevenModeratorThis reply has been marked as private.August 10, 2022 at 7:19 pm #74341volcanParticipantThis reply has been marked as private. -
AuthorPosts
- You must be logged in to reply to this topic.