Commit d35f7a569ebc5629b143e93a6dae3f76f3271cff

Authored by Timur Kastemirov
1 parent 844d518f

add facebook pixel code

Showing 1 changed file with 18 additions and 0 deletions   Show diff stats
frontend/views/layouts/main.php
... ... @@ -153,6 +153,24 @@ $this->registerJs("
153 153 <noscript><div><img src="https://mc.yandex.ru/watch/37829115" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
154 154 <!-- /Yandex.Metrika counter -->
155 155  
  156 + <!-- Facebook Pixel Code -->
  157 + <script>
  158 + !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  159 + n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
  160 + n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
  161 + t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
  162 + document,'script','https://connect.facebook.net/en_US/fbevents.js');
  163 + fbq('init', '1591060651200152', {
  164 + em: 'insert_email_variable,'
  165 + });
  166 + fbq('track', 'PageView');
  167 + </script>
  168 + <noscript><img height="1" width="1" style="display:none"
  169 + src="https://www.facebook.com/tr?id=1591060651200152&ev=PageView&noscript=1"
  170 + /></noscript>
  171 + <!-- DO NOT MODIFY -->
  172 + <!-- End Facebook Pixel Code -->
  173 +
156 174 <?php $this->beginBody () ?>
157 175 <?= BgWidget::widget () ?>
158 176  
... ...