Store page IDs on install. Closes #838