Index: openacs-4/packages/clickthrough/clickthrough.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/clickthrough.info,v diff -u -r1.3 -r1.4 --- openacs-4/packages/clickthrough/clickthrough.info 3 May 2001 20:47:06 -0000 1.3 +++ openacs-4/packages/clickthrough/clickthrough.info 4 Jun 2001 02:35:51 -0000 1.4 @@ -4,6 +4,7 @@ Clickthrough Clickthrough + f f @@ -15,10 +16,10 @@ 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. 2000-12-14 ArsDigita Corporation - 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). - + 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). + Any link can be clickthrough-enabled by embedding special information in its destination address. This is achieved by wrapping the href attribute with a call to `clickthrough_href' (e.g., [clickthrough_href http://www.arsdigita.com]). @@ -31,36 +32,47 @@ + + - - + + + + + + + + + + + - + Index: openacs-4/packages/clickthrough/tcl/clickthrough-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/tcl/clickthrough-procs-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/clickthrough/tcl/clickthrough-procs-postgresql.xql 4 May 2001 19:29:55 -0000 1.3 +++ openacs-4/packages/clickthrough/tcl/clickthrough-procs-postgresql.xql 4 Jun 2001 02:35:51 -0000 1.4 @@ -23,7 +23,7 @@ where local_url = :cached_local_url and foreign_url = :cached_foreign_url and package_id = :cached_package_id - and trunc(entry_date) = trunc(current_time) + and entry_date = current_date @@ -33,15 +33,15 @@ insert into clickthrough_log (local_url, foreign_url, entry_date, click_count, package_id) - select :cached_local_url, :cached_foreign_url, trunc(current_time), + select :cached_local_url, :cached_foreign_url, current_date, :cached_click_count, :cached_package_id where 0 = ( select count(*) from clickthrough_log where local_url = :cached_local_url and foreign_url = :cached_foreign_url and package_id = :cached_package_id - and trunc(entry_date) = trunc(current_time) + and entry_date = current_date ) Index: openacs-4/packages/clickthrough/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/index.vuh,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/index.vuh 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/index.vuh 4 Jun 2001 02:35:51 -0000 1.2 @@ -37,6 +37,8 @@ where sn1.object_id = :clickthrough_package_id and sn1.parent_id = sn2.node_id" + + # build the local url from the parent package base url and the relative url append local_url $parent_package_url [ad_conn path_info] Index: openacs-4/packages/clickthrough/www/admin/all-from-local.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-from-local.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/all-from-local.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/all-from-local.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -19,7 +19,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query all_from_local urls multirow " select entry_date, sum(click_count) as n_clicks from clickthrough_log where local_url = :local_url Index: openacs-4/packages/clickthrough/www/admin/all-from-local.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-from-local.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/all-from-local.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + select entry_date, sum(click_count) as n_clicks + from clickthrough_log + where local_url = :local_url + and package_id = :parent_package_id + group by entry_date + order by entry_date desc + + + Index: openacs-4/packages/clickthrough/www/admin/all-to-foreign.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-to-foreign.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/all-to-foreign.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/all-to-foreign.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -19,7 +19,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query all_to_foreign urls multirow " select entry_date, sum(click_count) as n_clicks from clickthrough_log where foreign_url = :foreign_url Index: openacs-4/packages/clickthrough/www/admin/all-to-foreign.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/all-to-foreign.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/all-to-foreign.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + select entry_date, sum(click_count) as n_clicks + from clickthrough_log + where foreign_url = :foreign_url + and package_id = :parent_package_id + group by entry_date + order by entry_date desc + + + Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -19,7 +19,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query by_foreign_url_aggregate urls multirow " select local_url, foreign_url, sum(click_count) as n_clicks from clickthrough_log where package_id = :parent_package_id Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url-aggregate.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + + select local_url, foreign_url, sum(click_count) as n_clicks + from clickthrough_log + where package_id = :parent_package_id + group by local_url, foreign_url + having sum(click_count) >= :minimum + order by foreign_url + + + \ No newline at end of file Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/by-foreign-url.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -17,7 +17,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query by_foreign_url urls multirow " select distinct local_url, foreign_url from clickthrough_log where package_id = :parent_package_id Index: openacs-4/packages/clickthrough/www/admin/by-foreign-url.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-foreign-url.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-foreign-url.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,11 @@ + + + + + select distinct local_url, foreign_url + from clickthrough_log + where package_id = :parent_package_id + order by foreign_url + + + Index: openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/by-local-url-aggregate.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -19,7 +19,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query by_local_url_aggregate urls multirow " select local_url, foreign_url, sum(click_count) as n_clicks from clickthrough_log where package_id = :parent_package_id Index: openacs-4/packages/clickthrough/www/admin/by-local-url.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-local-url.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/by-local-url.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/by-local-url.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -17,7 +17,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query by_local_url urls multirow " select distinct local_url, foreign_url from clickthrough_log where package_id = :parent_package_id Index: openacs-4/packages/clickthrough/www/admin/by-local-url.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/by-local-url.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/by-local-url.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + + select distinct local_url, foreign_url + from clickthrough_log + where package_id = :parent_package_id + order by local_url + + + + Index: openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -21,7 +21,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query one_foreign_one_day urls multirow " select local_url, click_count from clickthrough_log where foreign_url = :foreign_url Index: openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-foreign-one-day.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,25 @@ + + + + + select local_url, click_count + from clickthrough_log + where foreign_url = :foreign_url + and entry_date = :query_date + and package_id = :parent_package_id + order by local_url + + + + + + + + + + + + + + + Index: openacs-4/packages/clickthrough/www/admin/one-local-one-day.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-local-one-day.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/one-local-one-day.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/one-local-one-day.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -21,7 +21,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query one_local_one_day urls multirow " select foreign_url, click_count from clickthrough_log where local_url = :local_url Index: openacs-4/packages/clickthrough/www/admin/one-local-one-day.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-local-one-day.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-local-one-day.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,14 @@ + + + + + select foreign_url, click_count + from clickthrough_log + where local_url = :local_url + and entry_date = :query_date + and package_id = :parent_package_id + order by foreign_url + + + + Index: openacs-4/packages/clickthrough/www/admin/one-url-pair.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-url-pair.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/clickthrough/www/admin/one-url-pair.tcl 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/packages/clickthrough/www/admin/one-url-pair.tcl 4 Jun 2001 02:35:51 -0000 1.2 @@ -20,7 +20,7 @@ set parent_package_id [clickthrough_parent_package_id] -template::query urls multirow " +template::query one_url_pair urls multirow " select entry_date, click_count from clickthrough_log where local_url = :local_url Index: openacs-4/packages/clickthrough/www/admin/one-url-pair.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/clickthrough/www/admin/one-url-pair.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/clickthrough/www/admin/one-url-pair.xql 4 Jun 2001 02:35:51 -0000 1.1 @@ -0,0 +1,13 @@ + + + + + select entry_date, click_count + from clickthrough_log + where local_url = :local_url + and foreign_url = :foreign_url + and package_id = :parent_package_id + order by entry_date desc + + + \ No newline at end of file