Hook on opening a media/document

I am trying to find a hook to be able to set a datalayer.push everytime a document is opened. It could even be something that runs after the document is opened ex: https://proximite-courtage.fr/wp-content/uploads/2022/06/LISTE_PARTENAIRES_PC_22062022.pdf No. WP isn’t running when you visit PDF files directly via their URL, so there is no PHP loaded and no opportunities … Read more