0
Welcome Guest! Login
0 items Join Now

SOLVED Yandex analytics script in atom in Gantry 5

    • VladimirZ's Avatar
    • VladimirZ
    • Jr. Rocketeer
    • Posts: 23
    • Thanks: 0

    SOLVED Yandex analytics script in atom in Gantry 5

    Posted 9 years 1 month ago
    • I am going to use Custom CSS/JS atom for Yandex analytics script. The initial Yandex code is the following:
      <!-- Yandex.Metrika counter -->
      <script type="text/javascript">
          (function (d, w, c) {
              (w[c] = w[c] || []).push(function() {
                  try {
                      w.yaCounter35645*** = new Ya.Metrika({
                          id:35645***,
                          clickmap:true,
                          trackLinks:true,
                          accurateTrackBounce:true,
                          webvisor:true,
                          trackHash:true
                      });
                  } catch(e) { }
              });
      
              var n = d.getElementsByTagName("script")[0],
                  s = d.createElement("script"),
                  f = function () { n.parentNode.insertBefore(s, n); };
              s.type = "text/javascript";
              s.async = true;
              s.src = "https://mc.yandex.ru/metrika/watch.js";
      
              if (w.opera == "[object Opera]") {
                  d.addEventListener("DOMContentLoaded", f, false);
              } else { f(); }
          })(document, window, "yandex_metrika_callbacks");
      </script>
      <noscript><div><img src="https://mc.yandex.ru/watch/35645***" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
      <!-- /Yandex.Metrika counter -->

      As I understand the above code should be stripped out of <script></script> tags.

      What should I do with the last string of the code?
      <noscript><div><img src="https://mc.yandex.ru/watch/35645***" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
    • Last Edit: 9 years 1 month ago by VladimirZ.
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: SOLVED Yandex analytics script in atom in Gantry 5

    Posted 9 years 1 month ago
    • VladimirZ's Avatar
    • VladimirZ
    • Jr. Rocketeer
    • Posts: 23
    • Thanks: 0

    Re: SOLVED Yandex analytics script in atom in Gantry 5

    Posted 9 years 1 month ago
    • Thank you Damir.
      This is my first experience with Gantry 5. I tried to do smth similar to Google Analytics atom. So I didn't took into account the usage of the Page Setting
    • Damir's Avatar
    • Damir
    • Preeminent Rocketeer
    • Posts: 22450
    • Thanks: 2679
    • Web Developer

    Re: SOLVED Yandex analytics script in atom in Gantry 5

    Posted 9 years 1 month ago

Time to create page: 0.062 seconds