Commit 85f58cde285a83b4e954ac0dc40183a82dc226d1
Merge remote-tracking branch 'origin/master'
Showing
3 changed files
with
18 additions
and
15 deletions
Show diff stats
frontend/views/layouts/main.php
| @@ -27,19 +27,19 @@ $seo=\Yii::$app->get('seo'); | @@ -27,19 +27,19 @@ $seo=\Yii::$app->get('seo'); | ||
| 27 | <html lang="<?= \Yii::$app->language ?>"> | 27 | <html lang="<?= \Yii::$app->language ?>"> |
| 28 | <head> | 28 | <head> |
| 29 | <meta charset="<?= \Yii::$app->charset ?>"> | 29 | <meta charset="<?= \Yii::$app->charset ?>"> |
| 30 | - <!-- Google Tag Manager --> | ||
| 31 | - <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | ||
| 32 | - new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | ||
| 33 | - j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | ||
| 34 | - 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | ||
| 35 | - })(window,document,'script','dataLayer','GTM-NZ8XWMK');</script> | ||
| 36 | - <!-- End Google Tag Manager --> | ||
| 37 | <link href="https://fonts.googleapis.com/css?family=Ubuntu:400,500,700&subset=cyrillic,cyrillic-ext,latin-ext" rel="stylesheet"> | 30 | <link href="https://fonts.googleapis.com/css?family=Ubuntu:400,500,700&subset=cyrillic,cyrillic-ext,latin-ext" rel="stylesheet"> |
| 38 | <link type="image/x-icon" href="/images/favicon.ico" rel="icon"> | 31 | <link type="image/x-icon" href="/images/favicon.ico" rel="icon"> |
| 39 | <meta name="viewport" content="width=device-width, initial-scale=1"> | 32 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 40 | <?= Html::csrfMetaTags() ?> | 33 | <?= Html::csrfMetaTags() ?> |
| 41 | <title><?= Html::encode($seo->title) ?></title> | 34 | <title><?= Html::encode($seo->title) ?></title> |
| 42 | <?php $this->head() ?> | 35 | <?php $this->head() ?> |
| 36 | +<!-- Google Tag Manager --> | ||
| 37 | +<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | ||
| 38 | +new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | ||
| 39 | +j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | ||
| 40 | +'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | ||
| 41 | +})(window,document,'script','dataLayer','GTM-MZGFQ2B');</script> | ||
| 42 | +<!-- End Google Tag Manager --> | ||
| 43 | <!-- Global site tag (gtag.js) - Google Analytics --> | 43 | <!-- Global site tag (gtag.js) - Google Analytics --> |
| 44 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-124411316-1"></script> | 44 | <script async src="https://www.googletagmanager.com/gtag/js?id=UA-124411316-1"></script> |
| 45 | <script> | 45 | <script> |
| @@ -52,9 +52,9 @@ $seo=\Yii::$app->get('seo'); | @@ -52,9 +52,9 @@ $seo=\Yii::$app->get('seo'); | ||
| 52 | </head> | 52 | </head> |
| 53 | <body> | 53 | <body> |
| 54 | <!-- Google Tag Manager (noscript) --> | 54 | <!-- Google Tag Manager (noscript) --> |
| 55 | - <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NZ8XWMK" | ||
| 56 | - height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | ||
| 57 | - <!-- End Google Tag Manager (noscript) --> | 55 | +<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MZGFQ2B" |
| 56 | +height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | ||
| 57 | +<!-- End Google Tag Manager (noscript) --> | ||
| 58 | <?php $this->beginBody() ?> | 58 | <?php $this->beginBody() ?> |
| 59 | 59 | ||
| 60 | 60 |
frontend/views/site/index.php
| @@ -27,7 +27,7 @@ $moduleRequest=\Yii::$app->getModule('request_1'); | @@ -27,7 +27,7 @@ $moduleRequest=\Yii::$app->getModule('request_1'); | ||
| 27 | 27 | ||
| 28 | ?> | 28 | ?> |
| 29 | 29 | ||
| 30 | - <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCoR1Jb-mIFUjPwKiuSlmtYBEwnJOBnAgg&callback=initMap"></script> | 30 | + <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyCoR1Jb-mIFUjPwKiuSlmtYBEwnJOBnAgg"></script> |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | <header id="header_" class="section-box-header"> | 33 | <header id="header_" class="section-box-header"> |
frontend/web/js/events.js
| @@ -9,22 +9,25 @@ $(function() { | @@ -9,22 +9,25 @@ $(function() { | ||
| 9 | 9 | ||
| 10 | $('.section-forms #contact-form') | 10 | $('.section-forms #contact-form') |
| 11 | .on('submit', function() { | 11 | .on('submit', function() { |
| 12 | - dataLayer.push({'event': 'formsend_send'}); | 12 | + window.dataLayer.push({'event': 'formsend_send'}); |
| 13 | }); | 13 | }); |
| 14 | 14 | ||
| 15 | $(document) | 15 | $(document) |
| 16 | .on('submit', '#callback #contact-form', function() { | 16 | .on('submit', '#callback #contact-form', function() { |
| 17 | - dataLayer.push({'event': 'formsend_callback'}); | 17 | + window.dataLayer.push({'event': 'formsend_callback'}); |
| 18 | + console.log('callback'); | ||
| 18 | }); | 19 | }); |
| 19 | 20 | ||
| 20 | $(document) | 21 | $(document) |
| 21 | .on('submit', '#buy-form #contact-form', function() { | 22 | .on('submit', '#buy-form #contact-form', function() { |
| 22 | console.log(clicked); | 23 | console.log(clicked); |
| 23 | if (clicked === 'buy1') { | 24 | if (clicked === 'buy1') { |
| 24 | - dataLayer.push({'event': 'formsend_order1'}); | 25 | + window.dataLayer.push({'event': 'formsend_order1'}); |
| 26 | + console.log('buy1'); | ||
| 25 | } | 27 | } |
| 26 | if (clicked === 'buy2') { | 28 | if (clicked === 'buy2') { |
| 27 | - dataLayer.push({'event': 'formsend_order2'}); | 29 | + window.dataLayer.push({'event': 'formsend_order2'}); |
| 30 | + console.log('buy2'); | ||
| 28 | } | 31 | } |
| 29 | }); | 32 | }); |
| 30 | }); | 33 | }); |
| 31 | \ No newline at end of file | 34 | \ No newline at end of file |