Home › Forums › General Issues › Views Counter Field › Reply To: Views Counter Field
Hello Friend, how are you?
For you to count views or downloads of the pdf file, you need to change the workflow you have developed.
Today, you provide the user with the direct link to the file (pdf or otherwise), so you can’t know who clicked or not.
My suggestion to solve your problem, and first you create a template or a wp_ajax that receives by parameter the file that needs to be downloaded (or the post_id linked to the file).
This adds +1 to the preview field and then redirects the user to the final file link.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.