So I'm making a Next.js app where users can download software. Each software has a download link. If a user clicks download I want to do 2 things:
- Open the download URL in a new tab
- Make a API request to my backend to let it know that a user clicked download
So now im left with 2 choices:
a) Use a button with onclick of window.open("downloadUrl", "_blank", "noreferrer,noopener")
b) Use Download
I also would like to have the most across browser accessability.