我有一个fullpage.js jquery单页网站。我希望谷歌分析能够跟踪有人通过滚动进入单页网站的另一个“页面”。 页面没有加载,但域更改,如... /#SECTION1,... /#第2节谷歌分析和jQuery fullpage.js
www.cima-ecuador.com
我使用analytics.js ...已经发布的帖子并没有真正帮助我。
头:
<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','http://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-12543942-1', 'cima-ecuador.com');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>
我的身体部分是像
<div class="section" id="section0">
</div>
<div class="section" id="section1">
</div>
SPA并不真正适合搜索引擎优化...您可以将分析代码放入函数中,并在您每次输入类似分析的章节时调用它('section1')。只是一个想法... – Geo