Commit ac8a788dd8ffcf818c80368599dea3875c18215a
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,22 +10,24 @@ $(function() { | ||
10 | $('.section-forms #contact-form') | 10 | $('.section-forms #contact-form') |
11 | .on('submit', function() { | 11 | .on('submit', function() { |
12 | window.dataLayer.push({'event': 'formsend_send'}); | 12 | window.dataLayer.push({'event': 'formsend_send'}); |
13 | - console.log('callback pushed'); | ||
14 | }); | 13 | }); |
15 | 14 | ||
16 | $(document) | 15 | $(document) |
17 | .on('submit', '#callback #contact-form', function() { | 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 | $(document) | 21 | $(document) |
22 | .on('submit', '#buy-form #contact-form', function() { | 22 | .on('submit', '#buy-form #contact-form', function() { |
23 | console.log(clicked); | 23 | console.log(clicked); |
24 | if (clicked === 'buy1') { | 24 | if (clicked === 'buy1') { |
25 | - dataLayer.push({'event': 'formsend_order1'}); | 25 | + window.dataLayer.push({'event': 'formsend_order1'}); |
26 | + console.log('buy1'); | ||
26 | } | 27 | } |
27 | if (clicked === 'buy2') { | 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 | \ No newline at end of file | 34 | \ No newline at end of file |