aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2014-07-09 15:01:03 +0100
committerMatthew Somerville <matthew@mysociety.org>2014-07-09 15:01:03 +0100
commit8a783540ed52508bf72597f3e5ca85f6382c8165 (patch)
tree827c626c2532c886586d2d8a8d16b7462ce5c579
parent86ed8c1f48b02b1653d47598e2355ab4535404ca (diff)
Put back GA special created report URI.
Think it's needed for it to hang together.
-rw-r--r--templates/web/fixmystreet.com/tracking_code.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/web/fixmystreet.com/tracking_code.html b/templates/web/fixmystreet.com/tracking_code.html
index 1dd176189..42e71776d 100644
--- a/templates/web/fixmystreet.com/tracking_code.html
+++ b/templates/web/fixmystreet.com/tracking_code.html
@@ -9,6 +9,16 @@ ga('create', 'UA-660910-4', {'cookieDomain': '.fixmystreet.com'});
ga('set', 'anonymizeIp', true);
[% IF created_report %]
ga('require', 'ecommerce');
+ga(function(tracker) {
+ var page = tracker.get('location');
+ var extra = '';
+ if ( page.indexOf('?') != -1 ) {
+ extra = '&created_report=1';
+ } else {
+ extra = '?created_report=1';
+ }
+ tracker.set('location', page + extra);
+});
ga('ecommerce:addItem', {
'id': 'report/[% problem.id %]',
'name': 'Report'