Has anyone implemented a way to prevent users from initiating a chat if a visitor is coming from a country where customer has no presence using geo-location within live agent. Are their any best practices around how to implement this type of functionality? Thanks in advance.
As a best practice: don't do it (at least, automatically). Just because they appear to be located in a place you don't service does not mean they are in that place, or that they live there permanently. For example, what if they use a VPN, or TOR, or some aggregate connection that masks their real presence by a significant margin? What if they're on vacation, business travel, or planning to move to somewhere where you could gain them as a customer?
If you must do it, you should ask them to self-identify where their primary residence is, perhaps by way of a drop-down, so that they can access the service if they really should have the ability to chat with a person. As for the technical reason "how", you'd basically just check their location by some means, then make a decision if you'd like to display a message telling them your services are not available, or rendering the script tags that would be used to ultimately render the chat button (for example, see this question/answer).