javascript - Google Analytics: How to track pages in a single page application? -


currently in website, used html5's pushstate() , popstate in links increase speed. however, doesn't change real url , looks affect , mess google analytics's code. (doesn't show url change) there possible solution this? thanks,

if using newer analytics.js api, google's documentation requires following code trigger event:

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

if using older ga.js api, david walsh suggests ajax websites use _gaq.push method:

_gaq.push(['_trackpageview', '/some-page']); 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -