Smi GetCountry GetCountryCode

This example shows how you can retrieve the country name and country of of a visitor, based on its IP4 address.

Smartsite SXML CopyCode image Copy Code
{smi.getcountrycode("62.43.22.66")} - {smi.getcountry("62.43.22.66")}
{smi.getcountrycode("55.43.22.66")} - {smi.getcountry("55.43.22.66")}
{smi.getcountrycode("77.43.22.66")} - {smi.getcountry("77.43.22.66")}
{smi.getcountrycode("77.77.77.77")} - {smi.getcountry("77.77.77.77")}
{smi.getcountrycode("130.43.22.66", default=XX)} - {smi.getcountry("130.43.22.66", default=DoesNotExist)}
Example Result CopyCode image Copy Code
ES - Spain
US - United States
IT - Italy
IR - Iran (ISLAMIC Republic Of)
XX - DoesNotExist