Google analytics not counting pages loaded with AJAX, but they apear in real time information -
i started using ajax loading content front page. searched problem , found had add little piece of code.
ga('set', 'page', pagepath);//pagepath = consulted url ga('send', 'pageview');
now, problem that, though can see in real time informacion when page's content loaded front page, visits not being loged.
this analytics code i'm using
<!-- google analytics --> <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', 'ua-xxxxx-y', 'auto'); ga('send', 'pageview'); </script> <!-- end google analytics -->
is there i'm missing? thanks
Comments
Post a Comment