Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
64
rated 0 times [  71] [ 7]  / answers: 1 / hits: 19127  / 13 Years ago, fri, march 9, 2012, 12:00:00

Currently in my website, I used HTML5's pushState() and popState in links to increase the speed. However, this doesn't really change the real URL and it looks like it will affect and mess up the Google Analytics's code. (doesn't show a url change) Is there a possible solution for this? Thanks,


More From » html

 Answers
36

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']);

[#86961] Thursday, March 8, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
coby

Total Points: 27
Total Questions: 102
Total Answers: 97

Location: Honduras
Member since Wed, Jul 14, 2021
3 Years ago
coby questions
;