Crawlable ajax pages
I've read about Google and Google's possibility to crawl ajax pages using hash followed by a exclamation mark in the url, #!
( http://code.google.com/web/ajaxcrawling/docs/getting-started.html )
I have changed my website and I was wondering about Google Analytics. How do I track my visi开发者_C百科tors ajax requests?
Thank you in advance!
Google Analytics has a _trackPageview
function that you can call when you load content via AJAX to record a pageview. There's details in this Google Analytics Help topic and undoubtedly more in the GA docs.
Google just deprecated the need for the #! scheme.
http://googlewebmastercentral.blogspot.com/2015/10/deprecating-our-ajax-crawling-scheme.html
They state:
Today, as long as you're not blocking Googlebot from crawling your JavaScript or CSS files, we are generally able to render and understand your web pages like modern browsers.
So now you wont really need to track anything different in Analytics!
精彩评论