Commit ac8a788dd8ffcf818c80368599dea3875c18215a

Authored by Alexey Boroda
1 parent 71054e6d

-Some tests

Showing 1 changed file with 6 additions and 4 deletions   Show diff stats
frontend/web/js/events.js
... ... @@ -10,22 +10,24 @@ $(function() {
10 10 $('.section-forms #contact-form')
11 11 .on('submit', function() {
12 12 window.dataLayer.push({'event': 'formsend_send'});
13   - console.log('callback pushed');
14 13 });
15 14  
16 15 $(document)
17 16 .on('submit', '#callback #contact-form', function() {
18   - dataLayer.push({'event': 'formsend_callback'});
  17 + window.dataLayer.push({'event': 'formsend_callback'});
  18 + console.log('callback');
19 19 });
20 20  
21 21 $(document)
22 22 .on('submit', '#buy-form #contact-form', function() {
23 23 console.log(clicked);
24 24 if (clicked === 'buy1') {
25   - dataLayer.push({'event': 'formsend_order1'});
  25 + window.dataLayer.push({'event': 'formsend_order1'});
  26 + console.log('buy1');
26 27 }
27 28 if (clicked === 'buy2') {
28   - dataLayer.push({'event': 'formsend_order2'});
  29 + window.dataLayer.push({'event': 'formsend_order2'});
  30 + console.log('buy2');
29 31 }
30 32 });
31 33 });
32 34 \ No newline at end of file
... ...