Username Password
    Search

Electos Tutorial / Google Analytics


Google has a free tool for analyzing website statistics. Click here to view a demo.

After you have signed up with a free Google account, you will follow the steps which will create a tracking code. This tracking code will be added to your ASP files to allow Google to track website usage. The tracking code will look something like this:
<script src="http://www.google-analytics.com/urchin.js" _fcksavedurl=""http://www.google-analytics.com/urchin.js"" type="text/javascript">
</script>                              
<script type="text/javascript">
  _uacct="UA-xxxx-x";            
  urchinTracker(’<%=oPublisher.call("Get_PrintPageItem", iPageID, "Title") %>’);
</script>                              

You will use Google to create your own unique tracking code. Save your tracking code to a text file named "googleanalytics.asp". Upload this file to the DESIGN area of your website within the INCLUDE subfolder. You will notice I have added a VBScript call to print the page title. This will be used to allow Google Analytics to print a page name that will actually have some meaning to you instead of "normal.asp?pageid=4". Seeing "Products" or "Contact Us" will be much more descriptive.

 analytics1

Next, you will need to edit your ASP files to contain the following line of code before the </head>:
<%                                                                                    
    Dim strURL                                                                     
    strURL = Request.ServerVariables("script_name")             
    If InStr(1, strURL, "xxxwebsite", VBTEXTCOMPARE)=0 Then
%>                                                                                    
    <!-- #include file=’Include/googleanalytics.asp’ -->            
<%                                                                                    
    End If                                                                             
%>                                                                                   

analytics2

The xxx should be replaced with your website name defined in your electos setup. This is important so that as you are editing and previewing your website changes, Google will not be counting your page views in the totals. The above script is designed to only include the tracking code if a visitor uses your normal website URL.

If you are not sure what your website preview URL is, it can be found in the SETTINGS section of the CONTROL PANEL.

analytics4

When setting up your Website URL. You are supposed to enter your Website URL and default page separately, however I didn’t have any luck doing it that way. I’m not sure if it is directly related to Electos, ASP, or a bug in their tracking. What did work, was entering the entire path to my home page in the Website URL.

analytics3

Please note that it may take several days for your website information to start being collected, so please be patient. I have not noticed any impact on performance as a result of adding the tracking code to my website.