tagging content with geolocation - web

I am trying to develop an application where users will post content. It is a user-generated application, so every post will have a location attached to it, so that it can be filtered later for other users in that area or city.
For example: say users can list books on my website to sell. Now while listing I want to provide them a text box where they can enter a location. Now the entered location should be valid, so how do I verify that?
Also after posting the book, someone else searches for a book in his location then he/she should not only get results for his location but other nearby locations too.
These are few of my questions. If someone can answer them and guide me, I'd really appreciate it. Thanks.

To verify people's location, you'll want to use the HTML5 geolocation capabilities. Take a look here for a demo: http://merged.ca/iphone/html5-geolocation
Searching nearby is a bit trickier, but there are a few options. You could use a geocoding service (Google and Bing for example both offer geocoding REST APIs) to determine if people are in the same city, zip code, etc. Perhaps a better solution is to use database queries to search for nearby posts. Many databases now offer built-in geospatial data types to support exactly this kind of scenario. MySQL for example: http://dev.mysql.com/doc/refman/5.0/en/mysql-spatial-datatypes.html

Related

How do I track keywords entered in Google Search using Google Tag Manager?

I want to know what keywords brings users to our website. The result should be such that, every time a user clicks on a link of the company's website, the page URL, timestamp and keywords entered in search are recorded.
I'm not really much of a coder, but I do understand the basics of Google Tag Manager. So I'd appreciate some solutions that can allow me to implement this in GTM's interface itself.
Thanks!
You don't track them. Well, that is unless you can deploy your GTM on Google's search result pages. Which you're extremely unlikely to be able to do.
HTTPS prevents query parameters to get populated for referrers, which is what the core reason for it is.
You still can, technically, track Google search keywords for the extremely rare users who manage to use Google via http, but again, no need to do anything in GTM. GA will automatically track it with its legacy keyword tracking.
Finally, you can use Google Search Console where Google reports what keywords were used to get to your site. That information, however, is so heavily sampled that it's just not joinable to any of the GA data. It is possible, however, to join GSC with GA, but that will only lead to GA having a separate report from GSC and that's it. No real data joins.

Determine how a user found a product purchased on Amazon?

I have multiple products on Amazon that are being purchased. What I would like to find out is how the buyer found the item on Amazon. Did the buyer search on Amazon? Did the buyer follow a link from a Facebook Post or Tweet?
Is there anyway to retrieve this or any similar information? I don't care if it's from Reports, the MWS API, or anywhere else.
I found an article from 2012 that claims this functionality wasn't available at that time. But perhaps things have changed.
http://www.forbes.com/sites/suwcharmananderson/2012/01/11/amazon-should-give-self-publishers-more-data/#5b1bf155368e
Amazon has no control over how someone may access a particular page. This is more or less inherent in the nature of the internet, where from any location, you can link directly to a website. Furthermore, your browser doesn't 'pass forward' so to speak your browsing history to the Amazon, so it would have no data to record in this regard.
There are certainly methods of tracking this, for instance, if you have a special link that is ONLY posted on facebook, and the link simply records the click, and forwards you to the actual listing, but that would require controlled dissemination of website links, which is basically impossible.
So.. to answer your question, it is theoretically possible, and exceedingly improbably that this information is available.

What are the pros & cons of using Google CSE vs implementing dedicated search engine for a site like stackoverflow?

I understand that same work should not be repeated when Google CSE is already there, so what may be the reasons to should consider implementing a dedicated search engine for a public facing website similar to SO(& why probably StackOverflow did that ?). Paid version of CSE(Google site Search), already eliminates several drawbacks that forced dedicated implementation. Cost may be one reason to not choose Google CSE, but what are other reasons ?
Another thing I want to ask is my site is similar kind as StackOverflow, so when Google indexes its content every now & then, won't that overload my database servers with lots of queries may be when there is peak traffic time?
I look forward to use Google Custom search API but I need to clarify whether the 1000 paid queries that I get for 5$ are valid only for 1 day or they get adjusted to extra queries(beyond free ones) on the next day & so on. Can anyone clarify on this too?
This depends on the content of your site, the frequency of the updates, and the kind of search you want to provide.
For example, with StackOverflow, there'd probably be no way to search for questions of an individual user through Google, but it can be done with an internal search engine easily.
Similarly, Google can outdate their API at any time; in fact, if past experience is any indication, Google has already done so with their Google Web Search API, where a lot of non-profits that had projects based on such API were left on the street with no Google options for continuation of their services (paying 100 USD/year for only 20'000 search queries per year, may be fine for a posh blog indeed, but greatly limits what you can actually use the search API for).
On the other hand, you probably already want to have Google index all of your pages, to get the organic search traffic, so Google CSE would probably use rather minimal resources of your server, compared to having a complete in-house search engine.
Now that Google Site Search is gone, the best search tool alternative for all the loyal Google fans is Google Custom Search (CSE)
Some of the features of Google Custom Search that I loved the most, were :-
Its free (with ads)
Ability to monetise those ads with your AdSense Account
Tons of Customization options, including removing the Google branding,
Ability to link it with Google Analytics account, for highly comprehensive analytical report,
Powerful auto correct feature to understand the real intention behind the typos,
Cons : Lacks customer Support…
Read More: https://www.techrbun.com/2019/05/google-custom-search-features.html

Adding information to foursquare venue page?

My primary question is: Can connected apps add relevant information to venue pages?
I am a coder and avid Foursquare user. The basic information about venues is cool (location, photos, tips, etc.), but while I have my meal (in the case of a restaurant) I'd like to have more to read about the venue, such as the back-story, i.e., what's the history of the place, when was it founded, by who, and other interesting facts about the venue.
I thought connected apps would be the answer and that perhaps I could write a simple wiki to integrate with the venue page for users to provide their knowledge about the venue. But it seems from what I've read that's not the the intent of a connected app or the API. Am I correct is this assumption? And if so, can this idea be dropped into the Foursquare suggestion box? I think it would make a great value added feature - especially for us nerds who like to read.
This is a great use case for connected apps. Connected apps can reply to check-ins with up to 200 characters of text, and a link to more content. This can be used to provide additional information about the venue. Take a look at https://foursquare.com/apps/ to see examples of connected apps, and the kinds of responses they give to check-ins.

So, you're not allowed to copy data from foursquare's Venue Platform?

I was reading the API policy of foursquare Venue Platform.
"You may not use the API to to add new places to your database or alter location details for places in your database."
It raised two questions to me:
1. How would they know, if one added new places, etc. to his/ her own database?
I hear that foursquare (used to) use the google maps api, to retrieve information for locations, so does that mean it is viable to use Google Map's data to create one's own basic database?
Any help is appreciated.
Basically they are telling you - you can use our API and database to create great apps, but do not steal our know-how(the database copy). They won't probably find out if you copy few of them, but say - you make a startup based on their database which you fully copied, then they can sue you and get you in trouble....
For Google usage, refer to Google Policy here.

Resources