Creating Custom query strings on PDF links
-
I would like to filter all links to PDF files to have a query string of the file name, like the final output would be:
<a href="http://domain.com/wp-content/uploads/2016/10/whatever-filename.pdf?pdf=whatever-filename">Some link text</a>Adding this query string allows Google Analytics to give us more useful information apparently (sauce: https://moz.com/ugc/how-to-track-pdf-traffic-links-in-google-analytics-open-site-explorer)! Obviously adding the query string automatically in functions.php would be a lot nicer (and cooler) than manually adding the links.
The topic ‘Creating Custom query strings on PDF links’ is closed to new replies.