RevSense Manual
Requirements
RevSense requires at a minimum PHP version 4.2 and above, and MySQL 3.xx and above. It is also required that you have at least 3 Megabytes for the installation, and more space for when RevSense starts running. To test your version of PHP, you can create a simple script like this:<? phpinfo(); ?>
Installing RevSense
RevSense is easy to install.- Unzip the files to your local PC. All the files will reside in the "revsense" folder.
- Upload the folder without changing any files in it. You must upload the files to a directory that is visible to the web.
- Point your browser to where you uploaded the file, example: http://yoursite.com/revsense
- You'll see the installation screen. The first page may be to set some permissions. Use your FTP client software or your SSH client to set write permissions (0777) on the files and directories indicated.
- The second page of the software will ask for your database credentials. Have ready the following:
- MySQL login
- MySQL password
- MySQL hostname (name of the server. Typically "localhost")
- MySQL database -- you need to create this database before installing revsense.
- Once the installation is successful, you'll be ready to create your first zones.
RevSense installation screen
Setting up Zones
RevSense Zones perform the following tasks:- Group together ads for distinct parts of your site
- Determine the size of the ad that will display
- Sets the price and pricing of ads within each zone
- Sets rotation and ad layout and formatting
- Login as admin
- Click on Zones
- In the dropdown box labelled "Create a new Zone", select the ad size you want and give your zone a name
- Click on the zone you just created
- Enter more information about the zone as follows on this screenshot:

- Zone Status -- set the status as indicated
- Approval -- have RevSense set new ads to pending for you to approve
- Rate Method -- fixed rates or bidded rates
- Unit Type, CPC (Cost per Click), CPM (Cost per 1000 impressions), CPD (Cost per day)
- Rate -- the actual rate per Unit Type as above (eg: a CPC of .10 -- ten cents per click)
- Affiliate % -- if you have publishers/affiliates show your ads on other sites, you can pay them a percentage of the rate you specified. Set this percentage here, or leave it a 0 for no commissions. By setting the percentage to a non-zero value, publishers will be able to signup and access the publisher ad-code for this zone.
- Units -- You can set the number of units to expire ads. For example, if you chose the CPD option, you could set 30 to have an ad expire after 30 days in this zone. You can use the same method to set fixed a fixed number of impressions as well.
Creating Custom Ad Types
While RevSense comes with most common ad formats already installed, you can create new types of ads in almost any format. RevSense allows you to specify the fields you'd like advertisers to use, as well as the final format of the ad to be displayed on your site. Here's how to create custom ads.- Choose your zone
- Click on "Format" in the zone submenu
- View the list of pre-defined fields and check off the ones you want with the settings you want.
- In the "Edit Ad Template" you can wrap each field around the HTML of your choosing. Each field is represented like {FIELDNAME}. The squiggly braces indicate that the RevSense ad parsing engine will replace {FIELDNAME} with the actual value of the field that the advertiser entered. RevSense will also format the field as you indicated with font size, weight and color.
- Save the screen. If you have any ads in the zone, RevSense will show a preview of the template you just constructed and edited.
Once you've created the format, it is time to proceed to the layout section. The layout section determines how many of the kind of formatted ads you want to show, and in how many rows and columns. Select the number of rows and columns you need, and the maximum number of ads, then you can edit the layout HTML as needed.
Be sure to leave in place the <!-- BEGIN/END: xxx --> and {AD} HTML tags as they have meaning for the formatting parser. In the majority of cases, you'll never need to touch the Zone layout.
Creating Custom Ad Types
While RevSense comes with most common ad formats already installed, you can create new types of ads in almost any format. RevSense allows you to specify the fields you'd like advertisers to use, as well as the final format of the ad to be displayed on your site. Here's how to create custom ads.- Choose your zone
- Click on "Format" in the zone submenu
- View the list of pre-defined fields and check off the ones you want with the settings you want.
- In the "Edit Ad Template" you can wrap each field around the HTML of your choosing. Each field is represented like {FIELDNAME}. The squiggly braces indicate that the RevSense ad parsing engine will replace {FIELDNAME} with the actual value of the field that the advertiser entered. RevSense will also format the field as you indicated with font size, weight and color.
- Save the screen. If you have any ads in the zone, RevSense will show a preview of the template you just constructed and edited.
Once you've created the format, it is time to proceed to the layout section. The layout section determines how many of the kind of formatted ads you want to show, and in how many rows and columns. Select the number of rows and columns you need, and the maximum number of ads, then you can edit the layout HTML as needed.
Be sure to leave in place the <!-- BEGIN/END: xxx --> and {AD} HTML tags as they have meaning for the formatting parser. In the majority of cases, you'll never need to touch the Zone layout.
Using Keywords
RevSense allows you to show ads based on keywords. If you have a search engine, or a large content site, you can apply keywords to the ad code. Here are the steps to enable keyword targetting of ads:- Click on the zone you want to enable keyword targeting in.
- Click on "Keywords" in the zone menu and check the box to enable keyword targetting.
If keywords are enabled, you are also able to use the RevSense™ contextual code to contextually determine if ads should be show on your web pages. Click on the Zone -> Ad Code link to get the code.
Using the Ad Code
When you've finished setting up your zone, its time to place the ad code on your pages. Your ad code can be placed on any site on the internet, not just the server where RevSense is installed. Here are a few tips to make placing your ad code successful:
- Place the ad code exactly as it is, unless you are applying keywords
- Beware of HTML editors like Dreamweaver "rewriting" the changes you've made
- If you page has valid HTML and Javascript, you'll have a more successful experience
Standard RevSense Ad Code
This is the code you'll use when keywords are not enabled. Just place the javascript code in the HTML code of your page. The code must appear between the opening and closing BODY tag of your pages, exactly where you want the ads to appear.Keyword Driven Ad Code
This code will apply keywords you give it and serve matching ads. the code will look like this fragment:Contextual "RevSense" Ad Code
The contextual code will check the page that its on to see if any of the keywords match. It will select the best match and show ads matching that individual keyword. Simply place the code on the page where you want the ads to show up, and be sure to have ads in the zone with keywords that match content on your pages. As an additional feature, if you run a search engine or other search type of site, this code can automatically detect the keyword that was used in the query string of the browser. So suppose your query string looked like this:RevSense will check your page and cache the results for 24 hours before checking again. This will reduce the amount of spidering that has to be done.
Setup RevSense to alert Advertisers on Low Balance Conditions
Whenever an advertiser's balance drops below $20, you can have RevSense email them an alert. To do this you have to setup a cron job to call the following code:
wget "http://yourdomain.com/revsense/index.php?section=mailer" A typical UNIX cron job, set to call the mailer daily would look like this: 0 1 * * * wget "http://yourdomain.com/revsense/index.php?section=mailer" This would run the alert job at 1am every morning.
