Getting the pages in the site

This is also part of each evenings scheduled run. The site is serialized and each analytics entry is matched up to a page on the site. This whole project is heavily recursive, right from the site organization, right through to the final output where rankings are shown both for the page and the topic to which the page belongs.

Here's how the pages are fetched
  // this is the site i'm working with
  var site = SitesApp.getSite(options.domain, options.site);
  
  // get all the pages on the site
  var root = getPages(site);

Again I'm using exponential backoff to avoid those tiresome rate limit errors.



Now I have a a nice tree of all pages on my site, ready to be matched

For help and more information join our forum,follow the blog or follow me on twitter .



Comments