Track errors when uploading spreadsheets

Uses the new javascript event tracking stuff so that we can see what
errors people are getting when they upload spreadsheets.
This commit is contained in:
Chris Hill-Scott
2017-07-20 11:28:26 +01:00
parent eb264f34b7
commit 82233340b6
5 changed files with 8 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
(function(Modules) {
"use strict";
Modules.TrackEvent = function() {
Modules.TrackError = function() {
this.start = function(component) {

View File

@@ -1,4 +1,4 @@
<h1 class='banner-title'>
<h1 class='banner-title' data-module="track-error" data-error-type="Trial mode: bad recipients" data-error-label="{{ upload_id }}">
You cant send to
{{ 'this' if count_of_recipients == 1 else 'these' }}
{{ template_type_label }}

View File

@@ -1,4 +1,4 @@
<h1 class='banner-title'>
<h1 class='banner-title' data-module="track-error" data-error-type="Trial mode: too many recipients" data-error-label="{{ upload_id }}">
{% if original_file_name %}
Too many recipients
{% else %}

View File

@@ -24,7 +24,7 @@
{% if recipients.too_many_rows %}
<h1 class='banner-title'>
<h1 class='banner-title' data-module="track-error" data-error-type="Too many rows" data-error-label="{{ upload_id }}">
Your file has too many rows
</h1>
<p>
@@ -35,7 +35,7 @@
{% elif not count_of_recipients %}
<h1 class='banner-title'>
<h1 class='banner-title' data-module="track-error" data-error-type="No rows" data-error-label="{{ upload_id }}">
Your file is missing some rows
</h1>
<p>
@@ -47,7 +47,7 @@
{% elif not recipients.has_recipient_columns %}
<h1 class='banner-title'>
<h1 class='banner-title' data-module="track-error" data-error-type="Missing recipient columns" data-error-label="{{ upload_id }}">
Your file needs {{ recipients.recipient_column_headers | formatted_list(
prefix='a column called',
prefix_plural='columns called'
@@ -62,7 +62,7 @@
{% elif recipients.missing_column_headers %}
<h1 class='banner-title'>
<h1 class='banner-title' data-module="track-error" data-error-type="Missing placeholder columns" data-error-label="{{ upload_id }}">
The columns in your file need to match the double brackets in
your template
</h1>

View File

@@ -22,7 +22,7 @@
<div class="bottom-gutter">
{% call banner_wrapper(type='dangerous') %}
{% if row_errors|length == 1 %}
<h1 class='banner-title'>
<h1 class='banner-title' data-module="track-error" data-error-type="Bad rows" data-error-label="{{ upload_id }}">
There is a problem with your data
</h1>
<p>