Track number of downloads of a pdf file

I have a Download page where I have several different files for users to download. I want to add a counter next to each file’s name to indicate how many times they have been clicked/downloaded.
How might I do that.
The files are in an independent Data type called Dnloadfiles. I have a data type called “count” (type integer) but cant figure out how to invoke it after the file name is clicked.
Thank you for your help.

Hi @accts :wave:

How are you displaying them in you page? Are they inside a repeating group?
Can you share some images of your page and database?

1 Like

I’m not sure if i understood your problem, assuming you are displaying the files data in a repeating group, but here is what i would do:

  • install a ‘open new tab url’ plug in (free) so you can use buttons as click triggers;
  • create a new custom state somewhere as a type Dnloadfiles named selected_file (whatever you prefer);
  • create a new workflow triggered by clicking your download button (inside RG) to dowload;
  • next action, set the state of your selected_file to current cell’s Dnloadfiles;
  • add a action when your button is clicked to plugins → open in a new tab, with your data file URL
  • next, make changes to a thing in your Dnloadfiles to:
1 Like

Thank you all for helping. I learned from each response. So yes, thanks to you.