0

hello i trying to incorporate google analytics through my application that i have created using tidesdk. i have the standard javascript includes that you would usually use in a website however. i cant seem to get this to work.

(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-41910717-2');
ga('send', 'pageview');

when i check the alalytics page i do not see any activity.

has anyone ever done this is it even possible.

1 Answers1

0

Did you include the script tags? Also, are you placing it in between your head tags? If you use firebug or chrome developer tools, you should be able to see the analytics.js code loading. Do you see that?

<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-41910717-2');
ga('send', 'pageview');

</script>
Blexy
  • 9,573
  • 6
  • 42
  • 55