I am using PJAX https://github.com/defunkt/jquery-pjax and I was wondering since the whole page does not change what would be the best way to track analytics with google analytics?
I am using PJAX https://github.com/defunkt/jquery-pjax and I was wondering since the whole page does
Share
EDIT: Please note, this is no longer the case. See comment below.
Defunkts jquery-pjax will actually handle this for you by default (for google analytics at least). Essentially whenever a pjax page load gets invoked, it’ll tell the gaq object to log the new page.
The code it uses to do so looks like this: