Commit d0b13318f2450b2fbddfa4db48f275b9e8b3ac24
1 parent
484adcb4
-Form custom event
Showing
2 changed files
with
5 additions
and
2 deletions
Show diff stats
frontend/controllers/SiteController.php
frontend/web/js/modal.js
... | ... | @@ -59,6 +59,9 @@ $( |
59 | 59 | data: formData, |
60 | 60 | success: function(data) { |
61 | 61 | f.reset(); |
62 | + if (data.type == 'appointment') { | |
63 | + dataLayer.push({'event': 'mainFormSub'}); | |
64 | + } | |
62 | 65 | // form.replaceWith(data.alert) |
63 | 66 | // $(".modal-dialog").append(data.alert); |
64 | 67 | // setTimeout(function(){location.reload()}, 5000); |
... | ... | @@ -66,8 +69,7 @@ $( |
66 | 69 | $(".success_").animate({opacity: 1, top: '40'}, 200).addClass("done_"); |
67 | 70 | setTimeout(function(){$(".success_").animate({opacity: 0, top: '0'}, 200,function(){ |
68 | 71 | $(this).removeClass("done_"); |
69 | - })}, 4000); | |
70 | - | |
72 | + })}, 4000) | |
71 | 73 | }, |
72 | 74 | error: function() { |
73 | 75 | ... | ... |