diff options
-rw-r--r-- | conf/general-example | 7 | ||||
-rw-r--r-- | perllib/Page.pm | 17 | ||||
-rwxr-xr-x | web/alert.cgi | 4 | ||||
-rwxr-xr-x | web/confirm.cgi | 4 | ||||
-rwxr-xr-x | web/contact.cgi | 4 | ||||
-rwxr-xr-x | web/faq.cgi | 4 | ||||
-rwxr-xr-x | web/flickr.cgi | 4 | ||||
-rwxr-xr-x | web/flickr2.cgi | 4 | ||||
-rwxr-xr-x | web/fun.cgi | 4 | ||||
-rwxr-xr-x | web/posters/index.cgi | 4 | ||||
-rwxr-xr-x | web/questionnaire.cgi | 4 | ||||
-rwxr-xr-x | web/reports.cgi | 4 |
12 files changed, 35 insertions, 29 deletions
diff --git a/conf/general-example b/conf/general-example index ef9605635..7b3c79c72 100644 --- a/conf/general-example +++ b/conf/general-example @@ -14,7 +14,7 @@ * Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. * Email: francis@mysociety.org; WWW: http://www.mysociety.org * - * $Id: general-example,v 1.14 2007-07-09 17:40:28 matthew Exp $ + * $Id: general-example,v 1.15 2008-01-28 15:27:00 matthew Exp $ * */ @@ -44,6 +44,11 @@ define('OPTION_TILES_URL', 'http://tilma.mysociety.org/tileserver/10k-full-londo define('OPTION_EVEL_URL', 'http://services.mysociety.org/evel'); define('OPTION_GAZE_URL', 'http://gaze.mysociety.org/gaze'); +// Tracking +define('OPTION_TRACKING', 0); // off by default +define('OPTION_TRACKING_URL', 'http://path/to/web/bug'); +define('OPTION_TRACKING_SECRET', 'really-secret-value'); + define('OPTION_AUTH_SHARED_SECRET', ''); define('OPTION_HEARFROMYOURMP_BASE_URL', ''); diff --git a/perllib/Page.pm b/perllib/Page.pm index a123550e0..8ae6a2fe3 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.71 2008-01-03 15:06:01 matthew Exp $ +# $Id: Page.pm,v 1.72 2008-01-28 15:27:00 matthew Exp $ # package Page; @@ -25,6 +25,7 @@ use mySociety::DBHandle qw/dbh select_all/; use mySociety::EvEl; use mySociety::MaPit; use mySociety::PostcodeUtil; +use mySociety::Tracking; use mySociety::WatchUpdate; use mySociety::Web qw(ent NewURL); BEGIN { @@ -115,12 +116,10 @@ EOF =cut sub footer { - my $q = shift; - my $pc = ''; - if ($q) { - $pc = $q->param('pc') || ''; - $pc = "?pc=" . ent($pc) if $pc; - } + my ($q, $extra) = @_; + my $pc = $q->param('pc') || ''; + $pc = "?pc=" . ent($pc) if $pc; + my $track = mySociety::Tracking::code($q, $extra); return <<EOF; </div></div> <h2 class="v">Navigation</h2> @@ -136,6 +135,8 @@ sub footer { using some <a href="https://secure.mysociety.org/cvstrac/dir?d=mysociety/bci">clever</a> <a href="https://secure.mysociety.org/cvstrac/dir?d=mysociety/services/TilMa">code</a>. Formerly <a href="/faq#nfi">Neighbourhood Fix-It</a>.</p> +$track + </body> </html> EOF @@ -148,7 +149,7 @@ sub error_page ($$) { my ($q, $message); my $html = header($q, title=>"Error") . $q->p($message) - . footer(); + . footer($q); print $q->header(-content_length => length($html)), $html; } diff --git a/web/alert.cgi b/web/alert.cgi index 8fe5646ef..31a4cbe83 100755 --- a/web/alert.cgi +++ b/web/alert.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: alert.cgi,v 1.22 2007-10-19 20:48:51 matthew Exp $ +# $Id: alert.cgi,v 1.23 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard; @@ -55,7 +55,7 @@ EOF print Page::header($q, title => $title); print $out; - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/confirm.cgi b/web/confirm.cgi index 18cdfbaa0..445a90d00 100755 --- a/web/confirm.cgi +++ b/web/confirm.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: confirm.cgi,v 1.30 2007-11-12 18:31:00 matthew Exp $ +# $Id: confirm.cgi,v 1.31 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard; @@ -42,7 +42,7 @@ EOF print Page::header($q, title=>_('Confirmation')); print $out; - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/contact.cgi b/web/contact.cgi index 80b408130..cfbf952da 100755 --- a/web/contact.cgi +++ b/web/contact.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: contact.cgi,v 1.25 2007-11-29 15:56:41 matthew Exp $ +# $Id: contact.cgi,v 1.26 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard; @@ -27,7 +27,7 @@ sub main { $out = contact_page($q); } print $out; - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/faq.cgi b/web/faq.cgi index 8ed99b5a1..9264833ac 100755 --- a/web/faq.cgi +++ b/web/faq.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: faq.cgi,v 1.27 2007-08-29 23:03:16 matthew Exp $ +# $Id: faq.cgi,v 1.28 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard -db; @@ -16,7 +16,7 @@ sub main { my $q = shift; print Page::header($q, title=>_('FAQ')); print faq($q); - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/flickr.cgi b/web/flickr.cgi index 32b51bd7a..90c39bdf6 100755 --- a/web/flickr.cgi +++ b/web/flickr.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: flickr.cgi,v 1.6 2007-10-22 18:00:04 matthew Exp $ +# $Id: flickr.cgi,v 1.7 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard; @@ -94,7 +94,7 @@ EOF } print $out; - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/flickr2.cgi b/web/flickr2.cgi index 631e96f8c..8ba6982a1 100755 --- a/web/flickr2.cgi +++ b/web/flickr2.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: flickr2.cgi,v 1.3 2007-08-29 23:03:16 matthew Exp $ +# $Id: flickr2.cgi,v 1.4 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard; @@ -45,6 +45,6 @@ EOF print Page::header($q, title=>'Flickr photo upload'); print $out; - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/fun.cgi b/web/fun.cgi index 06d0992b7..5b3b8d087 100755 --- a/web/fun.cgi +++ b/web/fun.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: fun.cgi,v 1.1 2007-11-07 15:24:07 matthew Exp $ +# $Id: fun.cgi,v 1.2 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard -db; @@ -16,7 +16,7 @@ sub main { my $q = shift; print Page::header($q, title=>_('Weird and Wonderful reports')); print fun($q); - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/posters/index.cgi b/web/posters/index.cgi index a4f2fca2f..e857810e3 100755 --- a/web/posters/index.cgi +++ b/web/posters/index.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: index.cgi,v 1.5 2007-08-29 23:03:17 matthew Exp $ +# $Id: index.cgi,v 1.6 2008-01-28 15:27:01 matthew Exp $ use strict; use Standard -db; @@ -21,7 +21,7 @@ sub main { my $q = shift; print Page::header($q, title=>_('Publicity material')); print body($q); - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/questionnaire.cgi b/web/questionnaire.cgi index 6044d302d..92b488b2c 100755 --- a/web/questionnaire.cgi +++ b/web/questionnaire.cgi @@ -6,7 +6,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: questionnaire.cgi,v 1.17 2007-08-29 23:03:16 matthew Exp $ +# $Id: questionnaire.cgi,v 1.18 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard; @@ -27,7 +27,7 @@ sub main { } print Page::header($q, title=>_('Questionnaire')); print $out; - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); diff --git a/web/reports.cgi b/web/reports.cgi index bd1d58ef1..c7003c38a 100755 --- a/web/reports.cgi +++ b/web/reports.cgi @@ -7,7 +7,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: reports.cgi,v 1.13 2007-09-09 09:42:10 matthew Exp $ +# $Id: reports.cgi,v 1.14 2008-01-28 15:27:00 matthew Exp $ use strict; use Standard; @@ -205,7 +205,7 @@ sub main { } } } - print Page::footer(); + print Page::footer($q); } Page::do_fastcgi(\&main); |