Index: openacs-4/packages/clickthrough/clickthrough.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/clickthrough.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/clickthrough/clickthrough.info 4 Jun 2001 02:35:51 -0000 1.4 +++ openacs-4/packages/clickthrough/clickthrough.info 11 Jan 2002 18:30:36 -0000 1.5 @@ -26,7 +26,8 @@ - + + Index: openacs-4/packages/clickthrough/tcl/clickthrough-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-init.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/clickthrough/tcl/clickthrough-init.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/tcl/clickthrough-init.tcl 11 Jan 2002 18:30:36 -0000 1.2 @@ -15,9 +15,6 @@ nsv_set clickthrough_mutex mutex [ns_mutex create] # schedule cache sweeper to run every X seconds - ad_schedule_proc 300 clickthrough_cache_sweeper - - #ad_schedule_proc [ad_parameter "CacheSweeperInterval" "clickthrough"] clickthrough_cache_sweeper - #can't get package parameter during startup??? + ad_schedule_proc [ad_parameter -package_id [apm_package_id_from_key clickthrough] CacheSweeperInterval] clickthrough_cache_sweeper } Index: openacs-4/packages/clickthrough/tcl/clickthrough-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-procs.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/clickthrough/tcl/clickthrough-procs.tcl 6 Jan 2002 21:42:05 -0000 1.2 +++ openacs-4/packages/clickthrough/tcl/clickthrough-procs.tcl 11 Jan 2002 18:30:36 -0000 1.3 @@ -138,12 +138,7 @@ @creation-date 2000-12-04 @cvs-id $Id$ } { - -# if {[nsv_get clickthrough_cache total_clicks] >= [ad_parameter "CacheSize" "clickthrough"]} { -# } -# can't get package parameter if running as a scheduled proc??? - - if {[nsv_get clickthrough_cache total_clicks] >= 100} { + if {[nsv_get clickthrough_cache total_clicks] >= [ad_parameter -package_id [apm_package_id_from_key clickthrough] MaxNumberOfCachedClicks]} { # reached cache maximum size -> make a copy (to later write to db) and clear cache ns_log Notice "clickthrough_cache_sweeper: reached cache maximum size, dumping to database" Index: openacs-4/packages/clickthrough/www/admin/one-local-one-day.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-local-one-day.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/one-local-one-day.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/one-local-one-day.adp 11 Jan 2002 18:30:36 -0000 1.2 @@ -1,7 +1,7 @@ Clickthroughs from @local_url@ on @query_date@ -

Clickthroughs from @local_url@ on @query_date@

+

Clickthroughs from @local_url@ on @query_date@

@context_bar@ Index: openacs-4/packages/clickthrough/www/admin/one-url-pair.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-url-pair.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/one-url-pair.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/one-url-pair.adp 11 Jan 2002 18:30:36 -0000 1.2 @@ -2,7 +2,7 @@ @local_url@ -> @foreign_url@

- @local_url@ + @local_url@ -> @foreign_url@

Index: openacs-4/packages/clickthrough/www/doc/clickthrough-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/doc/clickthrough-requirements.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/doc/clickthrough-requirements.html 11 Jan 2002 18:30:36 -0000 1.1 @@ -0,0 +1,271 @@ + + +Clickthrough Package Requirements Template + + + + +

Clickthrough Package Requirements Template

+ +by Nuno Santos + +
+ +

I. Introduction

+ +The following is a requirements document for the Clickthrough package, an ACS service. + +

II. Vision Statement

+ +The Clickthrough package provides a service that allows a site or subsite +to monitor how its users exit the site, by recording which links are +followed to external sites. Any link can be clickthrough-enabled by embedding +special information in its destination address. + +

+ +Clickthrough collects information about each pair of local (origin) and foreign (destination) +addresses, including a daily count of clickthroughs between each such pair of addresses. + +

+ +This clickthrough log can be used to provide external sites with a measure +of how much traffic originated from the local site, which can be useful for +auditing or confirming revenue generating clickthroughs (e.g., referrals). + +

III. Clickthrough Package Overview

+ +The Clickthrough package, as a service, has no user interface: in fact, the clickthrough +functionality is totally transparent to the end user, who simply follows links as if they +were regular, direct links to external sites. The bulk of the package is composed of +admin pages that build reports about the collected information. + +

+ +The Clickthrough package is subsite aware and can be mounted under any other package +mount point to provide clickthrough logging service for that package (such a package +becomes the parent package). If site-wide clickthrough logging is desired, +a Clickthrough instance can be mounted under the site root. Namely, this can be done +to emulate the functionality and behavior of the legacy clickthrough module, which +used /ct/ as its "mount point". + +

+ +The allowed transitions in the Clickthrough package are: + +

    +
  • user level: +
      +
    • recording information about the clickthrough (origin, destination, date, + parent package), by incrementing the appropriate click count for each + clickthrough-enabled link that the user clicks on; +
    + +
  • Clickthrough administrator level: +
      +
    • obtaining reports about the collected information, including all clickthroughs + to and from specific addresses, by date, for each specific parent package. +
    +
+ +Clickthrough-enabled links to external sites can be embedded in dynamic pages +(e.g., Tcl, ADP) by using a procedure that automatically wraps a plain link with +the appropriate clickthrough information. + +

+ +Embedding links in static HTML pages, although supported in previous versions, is +no longer a requirement for this version of Clickthrough. In fact, the embedded link +would have to contain hardcoded clickthrough information. This has the disadvantage +of making such a clickthrough-enabled link dependent on the location (the mount point) +of the Clickthrough instance. + +

IV. Use-cases and User-scenarios

+ +The Clickthrough package is used by three possibly overlapping classes of users: + +
    +
  • Developers or designers (collectively referred to as "developers"), who embed + clickthrough-enabled links into dynamic pages; +
  • End-users (referred to simply as "users"), who follow clickthrough-enabled links + to external sites; +
  • Clickthrough administrators (referred to "admins"), who use the admin pages to + obtain information about the clickthroughs from the site to external addresses. +
+ + +

Clickthrough-enabling links

+ +David Developer wants a link on a page to be clickthrough-enabled. This means that when +the user clicks on the link she will be taken to the external site as soon as possible, and the +clickthrough will be logged in the background. + +

+ +To clickthrough-enable a link in a dynamic page (e.g., a Tcl or ADP page), David wraps the +href part of the link as an argument to a procedure that automatically provides +all the necessary information for the clickthrough to be logged, namely the location of the +local page (i.e., the origin of the clickthrough), as well as the location of the appropriate +clickthrough instance in the sitemap. In this case, David does not need to be aware of the +final location of the page he's writing nor be aware of whether and where the clickthrough instance +will be mounted on the sitemap, because he does not need to provide any information to the +procedure other than the destination URL. + +

Following clickthrough-enabled links

+ +Ursula User is browsing the site and follows a clickthrough-enabled link to an external site. +To Ursula, this link is indistinguishable from a regular link. By clicking on it, Ursula is taken +to the destination page as soon as possible, with only a slight delay. In the background, the +Clickthrough package has logged this clickthrough, by incrementing the daily click count for this +particular local-URL/foreign-URL/parent-package tuple. + + +

Obtaining reports about clickthroughs

+ +Albert Admin wants to know how users are exiting a specific part of the site by following links +to external sites. If a Clickthrough instance has been previously mounted under the package that Albert +is interested in (meaning that the package has been recording clickthroughs for clickthrough-enabled +links), he visits the admin pages for that Clickthrough instance and is able to see reports about when and +how frequently users have left that section by following clickthrough-enabled links to external sites. +Albert is shown a daily click count for each local page, for each external site and/or for each +local-URL/foreign-URL pair. Albert can see raw totals or agreggated data (summary reports). + + +

V. Related Links

+ +
    +
  • System/Package "coversheet" - where all documentation for this software is linked off of +
  • Design document +
  • Developer's guide +
  • User's guide +
  • Other-cool-system-related-to-this-one document +
  • Test plan +
  • Competitive system(s) +
+ +

VI.A Requirements: Data Model

+ +
    +
  • 10.10.0 Clickthrough log +

    +

      +
    • 10.10.10 Each clickthrough log record refers to a unique local-URL/foreign-URL pair + and to a parent package instance. +
    • 10.10.20 No more than one clickthrough log record for each local-URL/foreign-URL pair + will exist for any single day. +
    • 10.10.30 Each clickthrough log record contains an incremental count of the clickthroughs + for the local-URL/foreign-URL pair, the package instance and the day it refers to. +
    +
+ +

VI.B Requirements: Developer Support

+ +
    +
  • 20.10.0 Format of clickthrough-enabled links +

    +

      +
    • 20.10.10 A clickthrough-enabled link will have the following format: + /parent-package/clickthrough-package/relative-path-of-local-file-under-parent-package?send_to=foreign-url, in which + parent-package represents the mounting point of the parent package, + clickthrough-package represents the mounting point of the Clickthrough + instance underneath the parent package, + relative-path-of-local-file-under-parent-package represents the path to the local + file that contains the clickthrough-enabled link, relative to the parent package, and + foreign-url represents the URL of the external site. + +

      + + As an example, /doc/click/basics/file.html?send_to=http://www.adomain.com/adir/afile.html + will record clickthroughs from a file named file.html, located under + /doc/basics (/doc being the mounting point for the ACS Core Documents + package and basics being a subdirectory within that package) to the + http://www.adomain.com/adir/afile.html external page. +

    +

    + +

  • 20.20.0 Clickthrough-enabling links +

    +

      +
    • 20.20.10.0 Clickthrough-enabling links in dynamic pages +

      +

        +
      • 20.20.10.10 A developer shall be able to build a clickthrough-enabled + link in a dynamic page (e.g., Tcl or ADP pages) just by passing the destination, + or foreign, URL to a procedure. This procedure will return the content of + the href attribute of an <a> tag. + Such content will be determined at run-time and will correspond either + to a plain link to the provided URL or to a clickthrough-enabled link + to that same address, depending on whether a Clickthrough package is + mounted under the package to which the page belongs, or not. +
      +
    +
+ + +

VI.C Requirements: Internal Transactions

+ +
    +
  • 30.10.0 Recording clickthroughs +

    +

      +
    • 30.10.10 Clickthrough logging should use a caching mechanism in order to avoid incurring + a database hit for every link that is followed. +
    +
+ + +

VI.D Requirements: Administrator Interface

+ +
    +
  • 40.10.0 Raw data +

    +

      +
    • 40.10.10 The admin will be able to see a list of all clickthroughs from a local URL. +
    • 40.10.20 The admin will be able to see a list of all clickthroughs to a foreign URL. +
    • 40.10.30 For each local-URL/foreign-URL pair, the admin will be shown a daily count + of clickthroughs. +
    +

    + +

  • 40.20.0 Aggregated data (summary reports) +

    +

      +
    • 40.10.10 The admin will be able to see a list of all clickthroughs, grouped by local URL, + along with a total count of clickthroughs for each URL pair. +
    • 40.10.20 The admin will be able to see a list of all clickthroughs, grouped by foreign URL, + along with a total count of clickthroughs for each URL pair. +
    • 40.10.30 For each local-URL/foreign-URL pair, the admin will be shown a daily count + of clickthroughs. +
    +
+ + +

VII. Revision History

+ + + + + + + + + + + + + + + + + +
Document Revision #Action Taken, NotesWhen?By Whom?
0.1Creation2000/11/20Nuno Santos
+ +

+ +


+
nuno@arsdigita.com
+ +Last modified: $Date: 2002/01/11 18:30:36 $ + + + Index: openacs-4/packages/clickthrough/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/doc/index.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/doc/index.html 11 Jan 2002 18:30:36 -0000 1.1 @@ -0,0 +1,17 @@ + + + Clickthrough + + + +

Clickthrough

+
+ + +
+Last modified: Fri Jan 11 19:59:33 GMT+1 2002 + + +