Move page type logic into data helper, update observer to use new method