Add tracking code to Surfer?
-
I'd really like to be able to track the downloads of my PDF library which I've got in a Surfer app here https://library.uniteddiversity.coop
I'm running Umami on my Cloudron and would like to be able to drop the tracking code in somewhere.
What's the best/ easiest way to do this? Be nice if there was just a field in settings we could paste into
Thanks!
Josef.
-
@jdaviescoates I manually add the umami script statement (copied from umami website settings) into the html page.
Works fine for small sites with limited number of pages.
I doubt that qualifies as "best" way but maybe could be "easiest" for targeting certain pages. -
Yes adding the tracking code is preferred. I am trying to keep surfer as simple as possible, but I guess tracking PDF downloads will not work, since you can't inject script code into pdfs as such.
I guess this will only work, if surfer itself provides some GET stats of sorts. What could be the easiest way to deal with this though? Like maybe letting surfer just GET/POST some other url, which goes to some analytics endpoint?
-
@robi yeah, I've already got an ebook library going with Calibre too, but I like the simplicity of surfer/ basic directory listings.
https://i-librarian.net/ looks like a potentially good option though, and @ultraviolet has previously packaged it too, see:
-
@jdaviescoates I hear you, we have such a site too with GBs of content in browsable directories for members so it would be a welcome addition if we could add some tracking to it.. just need a custom script option.
-
Yourls lets you track link clicks so that might work for this use case. It's in the CR app store if you haven't come across it yet.
-
@jdaviescoates are you wanting to track individual files in a directory ? or when someone accesses the directory (listing) ?