diff options
author | Nick Jackson <nick@nickjackson.me> | 2015-01-06 15:25:50 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-02-16 17:07:22 +0000 |
commit | 2ffed24ccbd53d6d1b7381904c749ff6952ba24e (patch) | |
tree | 065b34756a810a83a77550539cbff4250aa930b1 /templates | |
parent | 9bbc76b814f2c7798bb008e626d59a788fc81c6e (diff) |
[fixmystreet.com] Survey in appropriate places.
Using SurveyGizmo. Display the survey 60% of the time initially.
Diffstat (limited to 'templates')
7 files changed, 17 insertions, 0 deletions
diff --git a/templates/web/base/tokens/confirm_problem.html b/templates/web/base/tokens/confirm_problem.html index 217fb0a72..8c92c874a 100644 --- a/templates/web/base/tokens/confirm_problem.html +++ b/templates/web/base/tokens/confirm_problem.html @@ -31,6 +31,8 @@ [% END %] +[% TRY %][% INCLUDE 'tokens/_extras_confirm.html' %][% CATCH file %][% END %] + </div> [% display_crosssell_advert( problem.user.email, problem.name ) %] diff --git a/templates/web/fixmystreet.com/footer_extra.html b/templates/web/fixmystreet.com/footer_extra.html new file mode 100644 index 000000000..ba32a5534 --- /dev/null +++ b/templates/web/fixmystreet.com/footer_extra.html @@ -0,0 +1,3 @@ +<script type="text/javascript"> + (function(){var e=0.6;var t=null;var n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r];while(i.charAt(0)==" "){i=i.substring(1,i.length)}if(i.indexOf("ms_srv_t=")==0){var t=i.substring("ms_srv_t=".length,i.length)}if(i.indexOf("ms_srv_r=")==0){var s=i.substring("ms_srv_r=".length,i.length)}}if(t==null){if(Math.random()<e){var o=Math.round((new Date).getTime()/1e3);document.cookie="ms_srv_t="+o+"; path=/";document.cookie="ms_srv_r="+document.referrer+"; path=/";t=o;s=document.referrer}else{document.cookie="ms_srv_t=X; path=/";t="X"}}if(t!="X"&&!!document.getElementById("ms_srv_wrapper")){var u=Math.round((new Date).getTime()/1e3)-t;var a=!!document.getElementById("user-meta");var f=document.getElementById("ms_srv_link");data={ms_time:u,ms_referrer:s||null,ms_registered:a,ms_transaction:f.getAttribute("data-transaction")};var l=[];for(var c in data){l.push(encodeURIComponent(c)+"="+encodeURIComponent(data[c]))}f.href=f.href+"?"+l.join("&");document.getElementById("ms_srv_wrapper").style.display=""}})() +</script> diff --git a/templates/web/fixmystreet.com/report/_extras_top.html b/templates/web/fixmystreet.com/report/_extras_top.html new file mode 100755 index 000000000..4938e8749 --- /dev/null +++ b/templates/web/fixmystreet.com/report/_extras_top.html @@ -0,0 +1,3 @@ +[% IF created_report %] + [% INCLUDE 'research/survey_link.html' %] +[% END %] diff --git a/templates/web/fixmystreet.com/research/survey_link.html b/templates/web/fixmystreet.com/research/survey_link.html new file mode 100644 index 000000000..7357249d8 --- /dev/null +++ b/templates/web/fixmystreet.com/research/survey_link.html @@ -0,0 +1,3 @@ +<div id="ms_srv_wrapper" style="display:none"> + <p><a href="https://www.surveygizmo.co.uk/s3/1907419/FMS-2014" id="ms_srv_link" data-transaction="report">We’re running a short survey to help us understand how well FixMyStreet works. If you’d like to take it, click here.</a></p> +</div> diff --git a/templates/web/fixmystreet.com/tokens/_extras_confirm.html b/templates/web/fixmystreet.com/tokens/_extras_confirm.html new file mode 100644 index 000000000..c27383f42 --- /dev/null +++ b/templates/web/fixmystreet.com/tokens/_extras_confirm.html @@ -0,0 +1 @@ +[% INCLUDE 'research/survey_link.html' %] diff --git a/templates/web/fixmystreet/footer.html b/templates/web/fixmystreet/footer.html index 71e87ddfb..63b04de83 100644 --- a/templates/web/fixmystreet/footer.html +++ b/templates/web/fixmystreet/footer.html @@ -37,5 +37,8 @@ <!-- [% INCLUDE 'debug_footer.html' %] --> </div> <!-- .wrapper --> + + [% TRY %][% PROCESS 'footer_extra.html' %][% CATCH file %][% END %] + </body> </html> diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html index 91762e022..314b09b28 100644 --- a/templates/web/fixmystreet/report/display.html +++ b/templates/web/fixmystreet/report/display.html @@ -17,6 +17,8 @@ <p class='form-success'>[% loc('You have successfully signed in; please check and confirm your details are accurate:') %]</p> [% END %] +[% TRY %][% INCLUDE 'report/_extras_top.html' %][% CATCH file %][% END %] + [% INCLUDE 'report/banner.html' %] [% INCLUDE 'report/_main.html' %] |