Since Oct 2015, Google have been able to crawl ajax sites automatically (so the recommendations made in former articles like this are officially deprecated).
But I'm still having trouble getting Google to recognize new pages. My homepage, www.example.com
, links to pages like www.example.com/?pageID=1234
The links to those pages exist on www.example.com
in the form of javascript catching the .on('mousedown', function() {})
event on certain elements and doing this on a high level:
//1) load some further html with jquery:
$('#div').load("aPage.html")
//2) update the url history and document title
window.history.pushState("string", "Title", "?pageID=" + pageIDVariable);
document.title = titleOfPageVariable";
//3) push a new page into google analytics...
ga('set', {page: '/?pageID=' + pageIDVariable,
title: titleOfPageVariable});
But after being live a little while, googling example.com returns nothing other than my homepage, and using the Google webmaster search console the "Search Traffic -> Search Analytics" section shows 0 impressions, 0 clicks, etc. So Google simply hasn't indexed those pages yet (which is also confirmed in the Index Report in the webmaster tools).
Whereas Google Analytics shows the pages I'm expecting (under Behavior -> Site Content -> All Pages).
Is there something fundamentally wrong with my setup? Or perhaps it's just a matter of time before Google will start indexing individual pages.
I haven't set up any "URL parameters" in Google's webmaster tools since I didn't think it was needed in this case.