Google places api - airbnb - google-maps-api-3

I would like to use the api like airbnb. I have search and read all posts/stackoveflow/google group that i can. I couldn't find the answer
In general i would like to do the following:
Would like the user to have the ability to insert advertise with full address
I would like to search in my db by city/street/country and radius according to users ads
Does i have to use api key? I have found autocomplete example without the api key and i works fine
Hope it makes sense.. I have looked on this Google group thread and this stackoverflow thread.. But i am not sure if this flow is allowed and optimise.
Thanks

Related

Geofencing products in woocommerce

I am developing a small, local delivery website using Wordpress and Woocommerce. I am trying to implement a conditional field or part of code that geofences (may not be the correct term) products to their postcodes. For example people who type in a particular postcode radius are only able to view a selection of products available in their area. It seems I'm looking for a type of SauceyApp.com or Just-Eat.co.uk type search feature. I'm assuming this requires the use of some form of Google Maps plugin. I have been searching for weeks and can't even get insight on where to begin. I was wondering if anyone knew how I can go about this or even a vague idea on where to start?
Google Maps has a Places API where you can put in a location and radius and get an autocomplete for searching local places and lists of places to map by category. To get a users location you could use the Geolocation Api which is supported by most browsers (IE 9+) or a geolocation service. All that's required is an Api key from google, location, and radius. They you can send in options to filter the data. Information on these parameters is listed here in googles docs.
An example query would look like this:
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&rankby=distance&types=food&key=YOUR_API_KEY
There are several open source wrappers around this api to give you something to start with:
python-google-places
google-places-api-java
Ruby wrapper for Google Places

How to get people search result for out of network connections in linkedin

I am using linkedin JSAPI to find people working in particular company , but my search result is limited to second degree connection is it possible to extend search result to display 3rd and out of network connection.
NOTE: In LinkedIn documentation it is described that it is possible to fetch only with first and last name,but in forums it is written as possible with facet search..but how is my question
Link:
https://developer.linkedin.com/forum/people-search-api-problem-out-my-network-profiles-search-return-always-empty-result?page=1#comment-34552
This is the code I used
IN.API.Raw("/people-search:(num-results,people:(headline,id,positions,first-name,location,public-profile-url))?facet=location,in:7127&facet=past-company,1283&facet=network,O&count=25")
.method("GET").result(function success(result) {
});
Found the answer
It is impossible to fetch search result for third and outside connection with linkedin basic plan..need premium account
https://www.linkedin.com/mnyfe/subscriptionv2?displayProducts=&family=general&c=23&trk=vsrp_people_upsell_executiveaccount

Capturing hash tag values in Google Analytics

We want to capture aggregated, anonymous search query history for analytic purposes to improve our internal search engine performance and metadata practices.
I found this article: https://support.google.com/analytics/answer/1012264?hl=en
Unfortunately, our search engine uses a hash tag instead of a question mark (nonstandard query string).
For example: http://www.site.com/search#q=search%20term
Is there a way to configure Google Analytics to recognize hash tag values in the URLs and capture these given a defined pattern?
Thanks
sorry to say this, but hash tags won't "make it" into the reports at all, so no search reports for hash tag.
There is a simple workaround though: use virtual pageviews, that would emulate the request with regular query parameter with ? sign.
_gaq.push(['_trackPageview', '/search?q=search%20term']);
However, this virtual pageview will generate a second pageview for a given page, which isn't preferable. So I would recommend setting up a new view specifically just for site search reports (or try to play around with advanced filters, which might get the work done). Also, don't forget to turn on the site search within the view settings as you would do otherwise:
Have you tested putting in a hash into the Query Parameter field?

Determining search query of guest user

In my app, there's a requirement to track search queries, which individuals to the app. The point here is to track specifically individuals/search_queries, i.e. I want to be able to say:
User 10.20.30.40 (IP is derived from client, ok) came to my website
from Google's search results page of 'hello world' query
Is that even possible?
I investigated the problem a bit. It turned out, that when the user on Google Search result page clicks a link and gets to the underlying page, the referer doesn't contain the search query. Say, for example, I entered a "Hello world" query...
I open google and enter a "Hello world" query;
I see a serach result page with a link to wikipedia on top; I follow it
I enter "document.referrer" in consonle to see:
http://www.google.com.ua/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CGkQFjAA&url=http%3A%2F%2Fru.wikipedia.org%2Fwiki%2FHello%2C_world!&ei=HZ0fUIXTIordtAau54GwAQ&usg=AFQjCNHSAHv8NwVNdaxMvh0OhIxs6Zb1rQ&sig2=a8tEGTBNcFWOPykloXj_Xg
There's a &q= param with a blank value, preventing me to figure out the query the user entered.
I believe Google internally uses some of the query params (i.e. ved, ei, usg or sig2) from the URL above to keep track of query used to get to the site, and thus gatehr the statistics about which queries are used mostly to the get to the website. I couldn't find any information regarding how to use them.
In the meantime, Google Analytics would only gather a general statistics, not for individuals. Yet I noticed that there's an ability to use Custom Variables. Is it possible to use them somehow in order to track query the user came with? If so, wouldn't it be a violation of Google Analytics Terms Of Service?
So again: is there a way to know a search query one came to the site with?
This is not possible. Google erases the value of q parameter, so instead of
`?q=search+query`
one always observs.
`?q=`
Though, Google provides another way (the so called convinient one) to know which queries were used to come to your website: Google Analytics.
Also, it's impossible to track user_ip/search_query pair due to Google Analytics ToS.

Google Maps: Converting cid to new Google+ Local ID

It seems that there's been a change in the Google Maps API. Google Places has now changed to Google+ Local. My question is an extension of this one here:
Google places API: from CID to reference?
His question was to store CIDs inside his database to be able to drop a single pin linking to the known place inside his map.
Example: http://maps.google.com/maps?cid=998657413562662319
It can be linked directly using the CID parameter, which will automatically drop the pin and link to the place.
In the past, clicking on the Places link on the map will bring you here:
Link: maps.google.com/maps/place?cid=998657413562662319
However, that has now changed. It will now link to Google+ instead:
Link: http://plus.google.com/100968423062387177527/about
(sorry, I'm limited to 2 hyperlinks)
My question is, how do you retrieve the CID now? What I intend to do is manually search the places beforehand using the normal Google Maps. I want to then retrieve the CID of these places and store it in my database manually. However, the CID is no longer available. What can I do?
This answer is copying from the poster's comments following the original question, just to allow the question to be answered, because it looks like the user has not yet acquired sufficient reputation to self-answer a question. It's also here to make it clear to other StackOverflow users that the question has been addressed:
The CID can be retrieved from the Google+ Local page simply by clicking on the marker on the map.
this is no longer the way to find a CID.
one option is to use this service:
https://cidfinder.view3.com/
you give them the google+ url and they will return the CID
another manual way to do it is clicking "view source"
and searching for "CID"
you'll find something like this:
div role=button data-cid="18434216952359358766"
so the value of "data-cid" is the cid you're looking for.

Resources