ip_geolocate <- function(ip){
url <- paste0("http://ip-api.com/json/", ip)
ip_json <- readLines(curl::curl(url))
jsonlite::fromJSON(ip_json)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.