Using Google Analytics to track AJAX requests

前端 未结 3 1857
夕颜
夕颜 2021-01-05 20:53

I\'m changing a big section of a website to use jQuery Address\' deep linking AJAX features. I\'m using URIs like mysite.com/#!/page1/subpage/ and so on.

<
3条回答
  •  自闭症患者
    2021-01-05 21:25

    The other answers are outdated (as of 2013)- Google's recommends using their new Universal Analytics

    You can track page views asynchronously like this:

    ga('send', 'pageview', '/my-page');
    

    See: https://developers.google.com/analytics/devguides/collection/analyticsjs/pages#overriding

提交回复
热议问题