diff --git a/templates/index.twig b/templates/index.twig index 066f995..f458c5a 100644 --- a/templates/index.twig +++ b/templates/index.twig @@ -115,7 +115,6 @@ - {% include 'email-page-form.twig' %} {% include 'intro-modal.twig' %} {% include 'about-tool-modal.twig' %} diff --git a/web/js/views/Application.js b/web/js/views/Application.js index 9c9b7e9..ed6fe4c 100644 --- a/web/js/views/Application.js +++ b/web/js/views/Application.js @@ -2,7 +2,8 @@ TGM.Views.Application = Backbone.View.extend({ events: { "click #at16ptx": "doNothing", - "click .googleplusone": "shareOnGooglePlus" + "click .googleplusone": "shareOnGooglePlus", + "show .about-tool,.extended-info": "onModalShow" }, initialize: function() @@ -75,6 +76,16 @@ TGM.Views.Application = Backbone.View.extend({ this.currentSize = newSize; TGM.vent.trigger('resized', newSize); } + }, + + onModalShow: function(e) + { + var $modal = $(e.currentTarget); + + if ($modal.hasClass('modal')) { + var label = $modal.find('.modal-header h3, .modal-header h2').text(); + _gaq.push(['_trackEvent', 'Modal', 'Show', label]); + } } }); \ No newline at end of file