How can I know how many people downloaded my pdf file on my website?

  • 1
  • Question
  • Updated 8 years ago
  • Answered
I have put a pdf file up for download on my website, it's for a promotion where it's actually free, but I would like to know how much is it working or not, so is there a way I can see how many people downloaded it?

Thank you!
Photo of Stéphanie Cholette

Stéphanie Cholette

  • 1 Post
  • 0 Reply Likes

Posted 8 years ago

  • 1
Photo of Sanja


  • 10698 Posts
  • 495 Reply Likes
Hello Stéphanie,

If you'd like to know how many times your visitors have downloaded a file from your website, you can use a combination of Google Analytics and HTML code on your website. There are ways to track different methods of file downloads (e.g., tracking a PDF file that opens in a new window). To get started with this, and find out more about the code you need, take a look at this blog: How to track downloads in Google Analytics.

Once you have decided which code will best suit your file, you can upload your file and then add code to your site using either an HTML Widget or a Text Widget. Here's how:

1. Click on Site > File Manager in the top menu bar.
2. Click on the "Upload Files" button that appears in the dialog box that opens.
3. Browse your computer's folders for the file you would like to upload and click on "OK" to upload it.
4. Close the File Manager.
5. Drag and drop an HTML or Text Widget onto your page (Adding HTML to an HTML or Text Widget).
6. Enter this code into the HTML editor:
<a href=”resources/my-file.pdf” target=”_blank” onclick=”_gaq.push(['_trackEvent','Download','PDF',this.href]);”>Download my file</a>
7.Replace "my-file.pdf" with the name of your PDF file and "Download my file" by the link text you want.
8. Save and republish your site.

The URL of your PDF will look like this: If your PDF is located in a folder in your File Manager then you add that folder to the path and your URL will look like this:

When a user clicks to download your file, a tracking pixel is requested and recorded in the database of Google Analytics. You will then be able to view the file's download history in your Google Analytics account.

I hope that helps!