r78611 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78610‎ | r78611 | r78612 >
Date:21:46, 19 December 2010
Author:rfaulk
Status:deferred
Tags:
Comment:
Added max amount, credit card, and paypal fields to landing page reporting query.
Modified paths:
  • /trunk/fundraiser-statistics/fundraiser-scripts/query_store.py (modified) (history)
  • /trunk/fundraiser-statistics/fundraiser-scripts/sql/report_LP_metrics.sql (modified) (history)

Diff [purge]

Index: trunk/fundraiser-statistics/fundraiser-scripts/sql/report_LP_metrics.sql
@@ -16,6 +16,11 @@
1717 donations / views as don_per_view,
1818 amount / views as amt_per_view,
1919 amount / donations as amt_per_donation,
 20+max_amt,
 21+pp_don,
 22+cc_don,
 23+pp_don / pp_clicks as paypal_click_thru,
 24+cc_don / cc_clicks as credit_card_click_thru
2025 '%s %s %s %s %s %s %s %s %s %s %s %s' as effluent
2126
2227 from
@@ -38,7 +43,12 @@
3944 SUBSTRING_index(substring_index(utm_source, '.', 2),'.',-1) as landing_page,
4045 count(*) as total_clicks,
4146 sum(not isnull(contribution_tracking.contribution_id)) as donations,
42 -sum(converted_amount) AS amount
 47+sum(converted_amount) AS amount,
 48+max(converted_amount) AS max_amt,
 49+sum(if(right(utm_source,2)='cc',1,0)) as cc_clicks,
 50+sum(if(right(utm_source,2)='cc' and contribution_tracking.contribution_id,1,0)) as cc_don,
 51+sum(if(right(utm_source,2)='pp',1,0)) as pp_clicks,
 52+sum(if(right(utm_source,2)='pp' and contribution_tracking.contribution_id,1,0)) as pp_don
4353 from
4454 drupal.contribution_tracking LEFT JOIN civicrm.public_reporting
4555 ON (contribution_tracking.contribution_id = civicrm.public_reporting.contribution_id)
Index: trunk/fundraiser-statistics/fundraiser-scripts/query_store.py
@@ -176,6 +176,16 @@
177177 return 13
178178 elif metric_name == 'amt_per_donation':
179179 return 14
 180+ elif metric_name == 'max_amt':
 181+ return 15
 182+ elif metric_name == 'pp_don':
 183+ return 16
 184+ elif metric_name == 'cc_don':
 185+ return 17
 186+ elif metric_name == 'paypal_click_thru':
 187+ return 18
 188+ elif metric_name == 'creditcard_click_thru':
 189+ return 19
180190 else:
181191 return -1
182192 else:

Status & tagging log