Index: trunk/fundraiser-statistics/fundraiser-scripts/query_store.py |
— | — | @@ -111,6 +111,23 @@ |
112 | 112 | campaign = args[3] |
113 | 113 | sql_stmnt = sql_stmnt % (start, end, campaign, lp, start, end, campaign, lp) |
114 | 114 | |
| 115 | + elif query_name == 'report_bannerLP_confidence': |
| 116 | + start = args[0] |
| 117 | + end = args[1] |
| 118 | + banner = args[2] |
| 119 | + lp = args[3] |
| 120 | + campaign = args[4] |
| 121 | + sql_stmnt = sql_stmnt % (start, end, banner, start, end, banner, campaign, start, end, banner, lp, campaign, start, end, banner, lp, campaign) |
| 122 | + |
| 123 | + elif query_name == 'report_ecomm_by_amount': |
| 124 | + start_time = args[0] |
| 125 | + end_time = args[1] |
| 126 | + sql_stmnt = sql_stmnt % ('%', '%', '%', '%', start_time, end_time) |
| 127 | + |
| 128 | + elif query_name == 'report_ecomm_by_contact': |
| 129 | + where_str = args[0] |
| 130 | + sql_stmnt = sql_stmnt % ('%', '%', '%', '%', where_str) |
| 131 | + |
115 | 132 | else: |
116 | 133 | return 'no such table\n' |
117 | 134 | |
— | — | @@ -127,8 +144,10 @@ |
128 | 145 | def get_query_header(self, query_name): |
129 | 146 | if query_name == 'report_contribution_tracking': |
130 | 147 | return ['Time','Banner','Landing Page','Campaign','Converted Amount', 'Suffix'] |
131 | | - elif query_name == '': |
132 | | - return '' |
| 148 | + elif query_name == 'report_ecomm_by_amount': |
| 149 | + return ['Timestamp','First Name','Last Name','Country','ISO Code', 'Amount'] |
| 150 | + elif query_name == 'report_ecomm_by_contact': |
| 151 | + return ['Timestamp','First Name','Last Name','Country','ISO Code', 'Amount'] |
133 | 152 | else: |
134 | 153 | return 'no such table' |
135 | 154 | |
— | — | @@ -256,6 +275,10 @@ |
257 | 276 | return 9 |
258 | 277 | elif metric_name == 'amt_per_imp': |
259 | 278 | return 10 |
| 279 | + elif metric_name == 'amt50_per_imp': |
| 280 | + return 14 |
| 281 | + elif metric_name == 'amt100_per_imp': |
| 282 | + return 15 |
260 | 283 | else: |
261 | 284 | return -1 |
262 | 285 | elif query_name == 'report_LP_confidence': |
— | — | @@ -267,8 +290,33 @@ |
268 | 291 | return 7 |
269 | 292 | elif metric_name == 'amt_per_donation': |
270 | 293 | return 8 |
| 294 | + elif metric_name == 'amt50_per_view': |
| 295 | + return 9 |
| 296 | + elif metric_name == 'amt100_per_view': |
| 297 | + return 10 |
271 | 298 | else: |
272 | 299 | return -1 |
| 300 | + elif query_name == 'report_bannerLP_confidence': |
| 301 | + if metric_name == 'click_rate': |
| 302 | + return 7 |
| 303 | + elif metric_name == 'completion_rate': |
| 304 | + return 8 |
| 305 | + elif metric_name == 'don_per_imp': |
| 306 | + return 9 |
| 307 | + elif metric_name == 'amt_per_imp': |
| 308 | + return 10 |
| 309 | + elif metric_name == 'don_per_view': |
| 310 | + return 11 |
| 311 | + elif metric_name == 'amt_per_view': |
| 312 | + return 12 |
| 313 | + elif metric_name == 'amt_per_donation': |
| 314 | + return 13 |
| 315 | + elif metric_name == 'amt50_per_imp': |
| 316 | + return 14 |
| 317 | + elif metric_name == 'amt100_per_imp': |
| 318 | + return 15 |
| 319 | + else: |
| 320 | + return -1 |
273 | 321 | else: |
274 | 322 | return 'no such table' |
275 | 323 | |