From 0625dbe113dc88fe707ca1fb036bf0a580781e15 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 16 Apr 2014 14:36:54 +0100 Subject: alter pave url sent to analytics on report completion In order to allow us to do funnel analysis in google analytics we need to send a differnt page url when a user completes a report. To do this we add a report_created=1 to the query string on either the report page or the report confirmation page for logged in and confirm by email users respectively. There's a bit of complication as we don't want to set a session cookie everywhere as that will break caching so we set a stash variable, although if the user is logged in this is controlled by a variable in the flash as there is already a session cookie at this point. also, removes the code that sends an event upon report completion as this was no use for funnel analysis. --- perllib/FixMyStreet/App/Controller/Tokens.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm') diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm index 19130e25f..44cb2429d 100644 --- a/perllib/FixMyStreet/App/Controller/Tokens.pm +++ b/perllib/FixMyStreet/App/Controller/Tokens.pm @@ -102,7 +102,7 @@ sub confirm_problem : Path('/P') { $c->res->redirect($report_uri); } - $c->flash->{created_report} = 'fromemail'; + $c->stash->{created_report} = 'fromemail'; return 1; } -- cgit v1.2.3