1. Download control
2. Add reference in your asp.net project
3. Add @Register as
<%@ Register Assembly="GAMapControl" Namespace="GAMapControl" TagPrefix="GA" %>
4. Put control on a page
<GA:GAMapControl runat="server"
   CountryPlace="RU" />
The asp.net control has three mandatory attributes:
AnalyticsEmailAddress - email address of Google Analytics account.
AnalyticsPassword - password of Google Analytics account.
AnalyticsProfileId - This is the profile ID for the Google Analytics profile that you would like to display the data from. The profile ID can be found by going to the setttings page of the profile on the Google Analytics website.
Dimension - type for displaying data. Can get who values "World" or "Country".

Also control has some optional attributes:
FromDate - start date for displaying statistics. If not set, data will displaying for 31 days. Value format is "yyyy-MM-dd".
ToDate - end date for displaying statistics. Value format is "yyyy-MM-dd".
CountryFilter - displaying statistics, for selected country. Example: "Russia", "France", etc.
CountryPlace - set zoom on selected place. Value format is ISO-3166. Example: "RU".
ShowLegend - If true, display a legend for the map. Can get who values "true" or "false".
FromColor - start color gradient to assign to values in the visualization. Value format is RGB - 0xRRGGBB. Default value "0xE0FFD4".
ToColor - end color gradient to assign to values in the visualization. Value format is RGB - 0xRRGGBB. Default value "0x267114". The gradient will calculated intermediary values, with the lightest color as the smallest value, and the darkest color as the highest.
Width - width for map. Default value "556px".
Height - height for map. Default value "347px".
CacheExpiration - time when data in cache will expired. Default "6" hours.

If you set CountryFilter="Russia", you will see:

If you set CountryFilter="Russia" and CountryPlace="RU", you will see:

Last edited Jun 23, 2010 at 12:15 PM by iklementiev, version 5


No comments yet.