Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Google Analytics for web developers

Paradigma
October 21, 2014
97

Introduction to Google Analytics for web developers

Description of the Google Analytics platform, how the tracking code works, metrics and dimensions, event hits, tests A/B, clientID and user_id

Paradigma

October 21, 2014
Tweet

Transcript

  1. None
  2. None
  3. • • • • •

  4. • • • •

  5. None
  6. None
  7. • • • •

  8. <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','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-2282690-1', 'paradigmatecnologico.com'); ga('send',

    'pageview'); </script>
  9. http://www.google- analytics.com/collect?v=1&_v=j20&a=806449001&t=pageview&_s=1&dl=http%3A%2F%2Fwww.paradigmatecnologico.com% 2F&ul=en-us&de=UTF-8&sd=24- bit&sr=1920x1080&vp=1920x199&je=1&fl=13.0%20r0&_u=MAC~&cid=416165610.1399537988&tid=UA-2282690- 1&z=2140666386

  10. o o o

  11. None
  12. analytics.js Google Analytics cookies

  13. • • • • • • •

  14. • • • •

  15. • • •

  16. <a href=“/documents/e-book.pdf”> <a href=“/documents/e-book.pdf” onclick=”ga(‘send’,’event’,’link’,’pdf’)”>

  17. ga('send', 'pageview', { 'dimension5': '<?=$author?>' });

  18. None
  19. Introduction to Google Analytics - @RubenMartinezS ga(function(tracker) { var clientId

    = tracker.get('clientId'); });
  20. <?if ($isAuthenticatedUser):?> ga('create', 'UA-XXXX-Y', {'clientId': '<?=md5($email)?>' }); <?else:?> ga('create', 'UA-XXXX-Y');

    <?endif;?>
  21. ga('create', 'UA-XXXX-Y', { 'userId': 'USER_ID' }); ga('send', 'pageview');

  22. None