Skip to content
Snippets Groups Projects
This project is mirrored from https://:*****@github.com/ebiwd/EBI-Framework.git. Pull mirroring updated .
  1. Aug 17, 2017
  2. Aug 11, 2017
  3. Aug 10, 2017
  4. Jul 27, 2017
  5. Jul 12, 2017
  6. Jul 10, 2017
  7. Jul 06, 2017
  8. Jul 05, 2017
    • wbazant's avatar
      Do not pollute global scope - enables Google Analytics to work correctly · 0d6ad6f9
      wbazant authored
      Google tells you to use analytics by including this snippet:
      <script>
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
      
        ga('create','unique tracker id', 'auto');
        ga('send', 'pageview');
      </script>
      
      i[r] is window['ga'] and if it's something truthy ([] is truthy) the snippet does nothing.
      
      At the same time foundationExtendEBI.js can not rely on window.ga being there (individual teams will have their own tracker, or not) so add an if-exists-then before each function call.
      0d6ad6f9
  9. Jun 21, 2017
  10. Jun 19, 2017
  11. Jun 12, 2017
  12. Jun 07, 2017
  13. May 18, 2017