fixed issue where view and clicks are not recorded properly