I am creating an international web application which users can subscribe to. I want subscription rates to vary based on the user's currency. If my user is in the US, they pay $19/month; if in China, they pay some other rate. So, I am thinking I could detect the user's location, and from their location, I can detect their currency (via a location to currency map table in my database). If I can't detect their currency, then I'll force them to enter it before displaying subscription rates.
Does this seem like an acceptable solution? Will this be pretty reliable? If not, can anyone think of a better solution?
Seems good. Geolocation is pretty reliable, and the mapping from countries to currencies should be easy. I don't know whether such a mapping is already available somewhere, though.
Just make sure that you allow users to change the currency, in case your detection fails. Or they're trying to subscribe while they happen to be abroad, or something.
how to get the location of a user might be helpful
Related
My ultimate goal: I want to automatically log my weight to healthkit on my phone every time I step on the scale.
Secondary goal: I don't want to spend much money, but I do want to learn. I'm a computer engineer and enjoy building hardware, but I don't just want to buy an off-the-shelf smart scale and install their app. Part of this comes down to data security: I don't like my information (especially health information) being in somebody else's hands.
Tertiary goal: I don't want to need an apple developer account (e.g., to roll my own on-phone app or something) but if I have to compromise here I will.
I want this to be as painless a process as possible - I've seen solutions that involve setting up a shortcut to ask for your current weight, etc, and I don't love that: less user interaction is better.
I'm usually wearing my apple watch when I weight myself, but might forget my phone (it's often right after a workout before I shower), if that helps.
I've seen a lot of questions on here talking about querying data, and I don't care about that: I'll use the phone to look at historical data, but I want to enter it automatically/painlessly so I have some data to look at.
For instance: I could set up an NFC sticker to open a shortcut, and maybe the process of scanning the sticker holds my phone in a specific place to read a QR code output by the scale? I honestly don't know if scanning a QR is possible in a shortcut, but this is just an example. The downside here is that I would need my phone on me.
The most promising solution from what I can tell is to build my scale to send the weight to google fit's API, and then install the google fit app on my phone to sync automatically. The downside is exposing my info to another service (google fit) rather than just keeping it in HealthKit, which I'd prefer.
Is there an auto-magic URL format that could trigger an iOS behavior to enter the data?
Is there an API through iCloud to just submit the data and not query it?
Is there a bluetooth option to talk to my watch and sync data there?
I see a lot of questions for querying/reading HealthKit data, but very little on submitting/saving it - so I'm not sure what's possible.
Suggestions appreciated!
Because anyone could fake their geolocation lat/long number to the app by various means. Are there any cheap and practical solution or service we could ensure that they have really stay in the same place as the geolocation they sent?
Maybe approximation from IP Address or something like that. I just think about geolocation game like Pokemon GO that should require people to really travel to specific location
We have a requirement to capture the number of users who successfully logged in or updated his/her profile.
On reading about this, we see that events are the right ones to use to capture this metric.
Just wondering, why can't we use the s.pageName to know the number of successful logins? We set a particular pagename to that variable, and the count of that page name tells us the number of successful logins or updated his/her profile.
You can create a calculated metric for your count of page views on the success page in Adobe Analytics as an alternative to capturing an event.
They are just different and have different advantages.
One reason using events can be helpful is that you could track an event across multiple domains or if you want to track different types of registrations (popup vs checkout). My employer runs dozens of websites and events are very useful to track errors across domains or checkout events.
Using a calculate metric can be very powerful as well. The biggest strength here being that (hopefully) you have been tracking pageNames since day one. If you use an event to add tracking, you will get tracking from the day you tagged it. If you use a calculated metric, you will be able to retroactively see data from years past.
Generally, we use a calculate metric in most cases where it doesn't provide any data issues.
I have to make a restaurant home delivery website, and the owners do not wish to deliver more than 6km away. I hear that the geoIP DB 'Maxmind GeoLite city' is not particularly accurate though. Furthermore if you know of a database that has a shortcode, or predefined query for obtaining the distance without loads of coding, I would love to hear about it! I hope the question is well defined enough. All advice welcome!
I don't know the specification of your project, but it's likely you do know the delivery address. In this case you could use Google's Geocoding APIs to get the position (lat,lng) and then calculate the distance.
Of course there are limitations in the amount of daily requests, but I hardly think your app will reach that limit.
Take a look here:
https://developers.google.com/maps/documentation/geocoding
As far as I know, there are no free IP geolocation databases that will reliably provide the accuracy you are looking for, especially if your client has visitors using mobile devices.
I would recommend that you take a look at W3C Geolocation JavaScript API. The results from this will often be more accurate than IP geolocation, especially if the user is on a device with GPS. Do note that it will pop up a dialog asking the user whether they want to share their location with your site.
HTML5 geo location if far more accurate than IP address based location.
http://ipgeo5.com/
I'm working on an iOS app that pulls events from Google Calendar and subsequently generates pins on a map for each event (based on what the event creator fills in for "Location"). The user can select a date range (today, this week, this month, etc.) and see all the events taking place near them over that period.
Problem 1: The app is for my local university, so a majority of the locations will be buildings on campus. These buildings have inconsistent addresses that are often difficult to find, so it would be good if the location "Foo Hall" would result in a pin on that building. Google Maps is capable of doing this, however Apple Maps has no knowledge of the buildings on my school campus.
Problem 2: In an ideal situation, thousands of students would be using this app. Each time they open the app, they could be viewing dozens of pins. Therefore, I'm worried that I may be pushing the limits imposed by Google's geocoding API (definitely the 2500 request limit, and maybe even the 100,000 request limit for the Business API).
So my question is... what would be the best solution for these two problems? Should I create a local database for building names and map them to coordinates? Or is there a way I can overcome the limitations of Google's Geocoding API? Is there a better solution I'm not thinking of?
Thanks for any help!
I would use latitude and longitude coordinates for the buildings and allow for people to add locations to the database if they are meeting somewhere that you have not added already. This way, the pins will drop in the center of the building if you want them to, because you are not relying on an address or on looking up a building name. You simply know that "Foo Hall" is at X latt. and Y long. And if someone selects "Foo Hall" or sees an event at "Foo Hall" there is a perfectly placed pin right in the middle of it on the map. I don't think you need to worry as much about the geocoding API if you are using hardcoded locations for the buildings either, because you won't have to be polling Google to get the building locations.
I would also use some sort of server to store the building locations so they can be updated or added to, either by you or by the users.
That's how I would handle it, good luck!