diff options
author | Zarino Zappia <mail@zarino.co.uk> | 2018-02-19 15:25:38 +0000 |
---|---|---|
committer | Zarino Zappia <mail@zarino.co.uk> | 2018-02-21 10:34:18 +0000 |
commit | 8c3a91b281c4e89f730b29c0cf52a0064f782bc5 (patch) | |
tree | 393ccb924d74cbd80951f8026dc7548d655725a9 | |
parent | 3063317ecf65ef15fa0c563c933b7a2d38702126 (diff) |
[UK] Track clicks on ".big-green-button"
We’re interested in seeing whether people are mistakenly clicking the
(inert) "Click map to report a problem" banner on the `/around` page.
This will record a Google Analytics event if and when they do.
Fixes mysociety/fixmystreet-commercial#963.
-rw-r--r-- | web/cobrands/fixmystreet.com/js.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet.com/js.js b/web/cobrands/fixmystreet.com/js.js index 9ecb8b8c2..e38e5edfc 100644 --- a/web/cobrands/fixmystreet.com/js.js +++ b/web/cobrands/fixmystreet.com/js.js @@ -10,4 +10,10 @@ } jQuery.validator.addMethod('validName', valid_name_factory(0), translation_strings.name.required); jQuery.validator.addMethod('validNameU', valid_name_factory(1), translation_strings.name.required); + + jQuery('.big-green-banner').on('click', function(){ + if (typeof ga !== 'undefined') { + ga('send', 'event', 'big-green-banner', 'click'); + } + }); })(); |