tomkr / embedr

Embedr frontend
Other
2 stars 2 forks source link

IFrame needs Google anlytics as well. #74

Closed mzeinstra closed 9 years ago

mzeinstra commented 9 years ago

the iframe currently has no GA code. This needs to be included.

mzeinstra commented 9 years ago

You can use this tracking code

<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-64494530-1', 'auto');
  ga('send', 'pageview');

</script>
tomkr commented 9 years ago

If I understand it, the GA code needs to be added to the viewer on media.embedr.eu. If that is the case, shouldn't this be a PR there? If not, then what am I missing? :smile:

mzeinstra commented 9 years ago

dealt with it in https://github.com/klokantech/hawk/pull/73