Can I automatically display which countries my readers are from? If so, how would this be accomplished?
|
closed as off topic by toscho♦ Feb 17 at 22:44
Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
Yes but it can be very expensive, error prone, and unreliable, with false positives
If you need to restrict access to a form or product, just make it clear that it's only available in countries X Y and Z. The customer can ignore it and then find themselves stuck halfway through a form anyway as they don't have a British credit card to pay with or a US social security number, after all they knew full well they were in the wrong country to begin with. If you're doing it as a purely visual exercise then the google analytics route is the way to go. You can either use the APIs or export the CSV from the relevant page and process it. |
|||
|
|
|
Yes and no. Your best bet is to get the readers country by their IP. To do this you'll need to use something like php-ip-2-country. Then store the results into a table then loop though to display them. Keeping in mind that people could always be spoofing their IP. Depending on your needs you could also use something like maploco which is a hosted map service that shows your visitors location. EDIT There are also have many plugins that do this for you. |
||||
|
|