Google Maps Geocoding API IP Address - google-maps-api-3

Currently I use Google Maps GeoCoding API to get location latitude and longitude from given address. However, the maps doesn't rendered correctly.
I check on the browser console and got following error "API keys with referer restrictions cannot be used with this API"
After check on google search, one of the recommendation is to change the API Key restriction to IP Address restriction.
But since the Geocoding API call is called from the browser, I assume the IP addresses I should registered in Google Console Platform is visitor IP Addresses. Is that correct ? Is anyone experience to set the IP Address restriction successfully ?
Thank you.

You can use Geocoding Service (as mentioned by #geocodezip) when you are trying to geocode an address in the client-side. The behavior, parameters and results of this two APIs are the same.
Sample address: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA
Geocoding Service sample demo: Please check this link
geocoder.geocode({'address': address}, function(results, status) {})
Geocoding API sample request: https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY
Compare the results! :)
Please note that for web service requests, you'll have to make sure that the address string you are trying to send is properly URL-encoded
Happy coding!

Related

Prevent Google analytics from passing IP address to google optimize

I am installing Google Optimize for my client BUT they ask me how google optimize collects the data from the web. If I understood correctly, Google Optimize does not save any data. Instead, it uses data collected from Google Analytics. Is this correct?
If so, my client does not want Google Optimize to access the user IP address. I tried to create a view on google analytics but I don't know how to exclude the IP address field with a filter. Can I prevent Google analytics from passing IP address to Google Optimize?
Google Analytics does not show the IP address in the reports, you can still use the anonymizeIp parameter in order to obfuscate the last part of the IP and thus make it anonymous to the Google Analytics servers (documentation).

Timezone from address or zipcode - Here API

I am trying to query timezone based on address or zipcode in HereMaps API. If any one knows can you please share the information.
Reverse Geocoding REST API can provide you timezone, when specifying locationattributes=adminInfo,timeZone
Exemple of Reverse Geocoding request
and extract of result:

Precise Geolocation reporting using Google Measurement API

I'm having issues with Google Measurement Api. I need to manually report ecommerce transactions to the analytics, and the only data i'm getting from the payment processor is Country Code (which is not precise enough for our analytics process) and IP address of person doing the purchase.
We've tried sending uip (User IP override) param but analytics ignores IP and does not extract the Geolocation from it.
We've tried using geoid, but as i said is not precise. We need city information too. I see that geoid can take integer as param which describes the precise location, but i don't know how to get to that number if only thing i have is IP address.
Any help or advice will be appreciated.
Which hit type do you use?
You must fulfill all mandatory fields of GA measurement protocol so the request could be accepted by GA.
https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters

How to get the IP that mixpanel event came from?

Is it possible to get the IP address that mixpanel event "came" from?
Either using their webapp or custom reports or API - any method would be helpful.
Or maybe we can extract the first/last IP address for the user (profile)?
Thank you
I just got an email from Mixpanel support.
Apparentaly the IP is only used for geolocation purposes and is not stored automatically. So there's no way to retrieve the IPs from which the events were tracked.

Google Maps geocode service is not working(google blocking our request)

We are using Google Maps geocode service to get Latitude and Longitude for a given address,
We invoke google maps geocode service in a loop for each address(the loop max size is 50 addresses).
we are using this MAPs for State of Texas HHSC Help website (https://www.211texas.org/211/)
Below is service URL that we are using to get Latitude and Longitude.
http://maps.google.com/maps/geo?q=1601%20Rutherford%20Ln,Austin%20TX%2078754&key=ABQIAAAAU6mRnxlKP7D0V5v9DF3PIRT7KmOOtdkA0SYMLaxMRemphasized textpf2Wu2TCRTCqatXcIx0ULuVNHCz_jELYoAgXw&output=csv&oe=utf8&sensor=false
Google thinks this is Unusual traffic from our computer network, but it is not.
If you copy and paste the above link on your browser URL, you will see the below message.
The service is not working and it says
We're sorry...
... but your computer or network may be sending automated queries. To protect our users, we can't process your request right now.
See Google Help for more information.
Need help ,
Sorry,If this is not right place to post this issue,
How to contact google on this issue, since its not commercial website issue.
or is there any alternative way to get Latitude and Longitude for given address.
Any insight would be appreciated.
Use the documented endpoint.
The documentation specifies:
http://maps.googleapis.com/maps/api/geocode/output?parameters

Resources