How to configure ContentMetrics

From EtherWiki
Revision as of 01:48, 13 June 2010 by Sstrader (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ContentMetrics is added to a web site by configuring a ContentMetrics (CM) server and then registering the source web site that will communicate with the CM server.

Configuring the ContentMetrics server

A ContentMetrics server (%CM-SERVER%) can be hosted on any web server that has MySQL 5+ and PHP 5+. Current available servers are:

The source web site must be registered with a user profile name (%PROFILE-NAME%) and host name (%HOST-NAME%).

Configuring the source web site

The following style sheet and two JavaScript file must be added to the <head> section of any page that will communication with the CM server:

<link rel="stylesheet" type="text/css" media="screen"
    href="%CM-SERVER%/style/cm.css" />
<script type="text/javascript"
<script type="text/javascript"

With these entries added, any number of regions can be added to the page. Each region will track metrics for that region and display configurable results:

<script type="text/javascript"
  • %REGION-ID% - A unique value within the registered %HOST-NAME%
  • %ACTIONS% - A bit mask of allowable actions for this view of the reigon:
    • 100 - Record each visit
    • 010 - Allow visitors to up vote
    • 001 - Allow visitors to down vote
  • %METRICS% - A bit mask of what recorded metrics should be displayed: