Country Property

 

Type: String

 

Returns the country of origin for the current visitor as a two-letter country code.

 

Note: BrowserHawk does not have any native capabilities to detect country of origin. You must have cyScape’s CountryHawk ActiveX product installed on the same server as BrowserHawk to use this property. CountryHawk is licensed and purchased separately from BrowserHawk. For more information on CountryHawk see http://www.cyscape.com.

 

The Country property is a convenience property for BrowserHawk customers who also have purchased CountryHawk. When you check the Country property, BrowserHawk actually creates an instance of the CountryHawk component behind the scenes, queries it for the visitor’s country code, destroys the instance of the CountryHawk component, and then returns this answer to you.

 

Therefore, the following two examples are functionally equivalent:

 

Example 1:

<% set bhObj = Server.CreateObject("cyScape.browserObj") %>

<html> Your browser is: <% bhObj.Browser %> <br>

Your country code is: <% bhObj.Country %>

</html>

 

Example 2:

<% set bhObj = Server.CreateObject("cyScape.browserObj")

set chObj = Server.CreateObject("cyScape.CountryObj") %>

<html> Your browser is: <% bhObj.Browser %> <br>

Your country code is: <% chObj.CountryCode %>

</html>

 

The main advantage to using the approach shown in Example 1 is simply convenience. This is particularly handy if you already have an instance of the BrowserHawk object created, and just need the two-letter country code of the visitor. This approach also simplifies integration between BrowserHawk Reports and CountryHawk, enabling you to easily log the visitor’s country of origin along with your BrowserHawk statistics.

 

See Also:

TimeZoneDiff Property

Language Property

LangUser Property

LangSystem Property