add page visibility event