If you are using the newer analytics.js
API, Google’s documentation requires the following code to trigger the event:
ga('send', 'pageview', '/some-page');
If you are using the older ga.js
API, David Walsh suggests AJAX websites to use the _gaq.push
method:
_gaq.push(['_trackPageview', '/some-page']);