0

So I'm trying to implement a simple location autocompletion with the google places api. I'm using the autocomplete service for this (see: https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service).

What I'm doing right now is, creating an autocomplete token and renewing it if either 3 Minutes ran out (according to How long do the new Places API session tokens last?) or a place detail request was set (according to https://developers.google.com/places/web-service/session-tokens).

Now, I want to debug this and want to know if I did it properly.The dashboard on the google developer console counts every single request made though.

How do I know if it has an effect?|

Yggdrasill
  • 166
  • 1
  • 3
  • 16

1 Answers1

3

If you implemented session tokens correctly in your application, in your billing report within the Google Cloud Platform Console you should see one or both of the following SKUs:

Autocomplete without Places Details – Per Session
Autocomplete (included with Places Details) – Per Session

If you didn't, you'll see this instead:

Autocomplete – Per Request

Note that this only applies if you use getPlacePredictions(). There are no session tokens for getQueryPredictions().

Hope this helps!

evan
  • 5,443
  • 2
  • 11
  • 20
  • I'll verify this in the next few days and give a feedback. For now, thank you very much for this info! – Yggdrasill Dec 11 '19 at 19:42
  • Great! Yes please keep me posted. ^^ – evan Dec 12 '19 at 04:41
  • Heya @Yggdrasill any news on this please? – evan Dec 25 '19 at 10:21
  • Not yet, had some busy weeks. I'll update you when I have checked and tested it. I hope it isn't too urgent. Merry Christmas. – Yggdrasill Dec 26 '19 at 16:46
  • 2
    Yes, it works. Exactly how you said it. Thank you very much. To make it easier how to exactly find this: On the Dashboard navigate to the navigation menu on the top left. Click on "Billing". On the left click on "Report". On the right pick the time range to get the report for. IMPORTANT: Group by SKU. You will now find what evan was talking about at the bottom. – Yggdrasill Mar 28 '20 at 13:21
  • 1
    Glad to hear! Happy to have been of help :) – evan Mar 28 '20 at 15:16