Tracking file downloads only if url contains specific words #4108
Always-Self-Hosted
started this conversation in
Anything Else
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently I am using the file tracking script with my own list of files, with the intention of trying to keep track of how often my self hosted repos or specific files in those repos are downloaded. One such example would be I have a python script that has the ability to self update, and so it would be nice to roughly know how many of my scripts are out there updating themselves.
The current problem i have is, there is multiple ways to interact with the same file, so for example you can just visit the repo on the web and open that file, or you can download the file using the raw subpath (which is what the script uses). So currently both of these methods trigger the file download, and so there is no way to determine if a file download captured event was someone just looking at the source file on the web, or downloading the raw file.
Is there any tricks we can use to only load the file download script if a url contains a specific word to solve my problem? (in this case i would only want to track file download events for urls that contain raw in their path)
Beta Was this translation helpful? Give feedback.
All reactions