High number of requests to API key – Too costly

New home Forums Pro Add-on Pre-sale questions High number of requests to API key – Too costly

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #74282
    volcan
    Participant

    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!

    #74291
    Steven
    Moderator

    Hi @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.

    #74293
    volcan
    Participant

    Hi,

    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!1m4!1i6!2i15!3i23!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Y1fHMuZTpsLnQuc3xwLnY6b2ZmLHMudDo2NnxzLmU6Z3xwLmM6I2ZmM2E0NzYyLHMudDo2fHMuZTpnfHAuYzojZmY2Mjk5YWEscy50OjZ8cy5lOmx8cC5jOiNmZmZmZmZmZixzLnQ6NnxzLmU6bC50LmZ8cC5jOiNmZjRlNmQ3MA!4e0!23i1379903&key=AIzaSyBHQmkQgFKsMlPb912F4IIsPb_-shxOySs&token=94612

    #74294
    volcan
    Participant

    Sorry forgot to add the screenshot

    Attachments:
    You must be logged in to view attached files.
    #74297
    Steven
    Moderator

    Hi @volcan,

    Could I kindly ask if you would be able to provide us with a link to your website as well?

    #74301
    volcan
    Participant

    Sure! 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

    #74302
    volcan
    Participant

    Oh 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 week, 2 days ago by volcan.
    #74311
    Steven
    Moderator
    This reply has been marked as private.
    #74328
    volcan
    Participant
    This reply has been marked as private.
    #74331
    Steven
    Moderator
    This reply has been marked as private.
    #74341
    volcan
    Participant
    This reply has been marked as private.
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.