Web Applications

Smart Referrer Installation

Installing Smart Referrer for MS SQL Server Database

Smart Referrer Installation

Installing Smart Referrer for MS SQL Server Database

A. Contents of the zip file in the zip file you downloaded

You will find the following files:

  1. SmartReferrer.sql (SQL scripts for generating required tables and stored procedures)
  2. smart_Referrer.htm (sever side include file to be included in pages requiring monitoring)
  3. SmartReferrerAdmin.asp (Administration panel for pages to be monitored and referrer reports)
  4. smart_referrer_fill.gif
  5. smart_referrer_header.gif
  6. Readme.txt (content similar to this page section)

B. Installation steps

  1. Important: Place the smart_referrer.htm file anywhere convenient for you (since it is to be used as an server side include file). Files 3,4 and 5 should be under the same folder e.g Admin folder.
  2. Important: To create the required tables and stored procedures run the sql scripts file (SmartReferrer.sql). You can also open the file in Notepad, copy the contents of the file, paste it into your SQL Server Query Analyzer, choose the correct database into which you want the Referrer data to go to and then run the queries.
    Note: If your SQL Server Database owner is something else other than 'dbo' then replace 'dbo' with it in the .sql file before running it.
  3. Very Important NOTE: All Monitored pages must be .asp files and buffering should be turned ON. Hint: Place the following code right at the beginning (1st line onwards) of your page.
     <% Option Explicit
           Response.buffer = True %>

  4. Include the smart_Referrer.htm file as a server side include(SSI) in all pages needing monitoring (recommended at the bottom).
    just add this code : <!--#include virtual="/your_folder_path/smart_Referrer.htm" -->
    Note : Make sure the path is right.
  5. The Administration panel is for activating, editing, deleting and deactivating pages that need monitoring and accessing the reports. Add the complete URL of the pages to be monitored in the admin panel i.e., in SmartReferrerAdmin.asp. for eg. We need to add http://www.smartwebby.com/default.asp for our default page.
  6. Also view the referrers to your page in the SmartReferrerAdmin.asp page. There are very comprehensive complete reports on the hits to your page.
    1. Brief Report : Reports the total hits till date, This week's hits, Today's hits, Last recorded date's hits and Last recorded week's hits for the monitored page.
    2. Today's Report : Gives information on all the referrers that have monitored your page today.
    3. General Report : This report gives you the total hits till date, This week's hits, Today's hits, Last recorded date's hits and Last recorded week's hits for each of the referrers.
    4. No Hits Report : This report gives all the referrers that have not accessed you page today.
    5. Display of monitored and archived pages : Here you can see all the pages that are monitored and also the pages that are archived or deactivated.
  7. Important: To make your SmartReferrer work you need to give the connection string to your SQL Server Database in the smart_Referrer.htm and SmartReferrerAdmin.asp pages. Open the code view of this page and you will immediately find the following lines clearly marked out for your convenience.

    strDB="Driver={SQL Server};Server=yourServerIPAddressOrName;UID=yourUserID;PWD=yourPassword;DATABASE=yourDatabaseName"

    Substitute the following with your SQL Server database details, that would have been assigned to you when you bought the database space, as listed below:
    1. yourServerIPAddressOrName - this is your SQL Server database IPAddress or Name.
    2. yourUserID - your SQL Server database's User Name.
    3. yourPassword - your SQL Server database's Password.
    4. yourDatabaseName - your SQL Server database Name.

    If your database connection needs to be a DSN type then give your DSN name as an additional clause in the above connection string. Just replace 'yourSystemDSNName' or 'yourFileDSNName' according to your DSN type with your assigned DSN Name like in the example string below and place it in the code.

    For a System DSN the connection string will be:

    strDB="Driver={SQL Server};Server=yourServerIPAddressOrName;UID=yourUserID;PWD=yourPassword;DATABASE=yourDatabaseName;DSN=yourSystemDSNName"
    For a File DSN the connection string will be:

    strDB="Driver={SQL Server};Server=yourServerIPAddressOrName;UID=yourUserID;PWD=yourPassword;DATABASE=yourDatabaseName;FILEDSN=yourFileDSNName"

Good Luck and Best Wishes from the Smart Webby Team! If you have any problems or suggestions please contact us at admin@smartwebby.com.

SmartWebby.com - 2001-2008 All Rights Reserved.

This product has been created by SmartWebby.com for free distribution.
We will not be held responsible for any unwanted effects due to the usage of this product or any derivative.
No warrantees for usability are given or implied.

Please like, +1, link to and share this SmartWebby resource if you found it helpful. Thanks!