Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Add tracking code to Surfer?

    Surfer
    5
    9
    175
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jdaviescoates
      jdaviescoates last edited by

      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.

      I use Cloudron with Gandi & Hetzner

      timconsidine 2 Replies Last reply Reply Quote 1
      • timconsidine
        timconsidine @jdaviescoates last edited by

        @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.

        1 Reply Last reply Reply Quote 1
        • nebulon
          nebulon Staff last edited by

          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 1 Reply Last reply Reply Quote 1
          • robi
            robi @nebulon last edited by robi

            @nebulon

            @jdaviescoates uses the directory listing part of Surfer IIRC, hence Surfer generates the HTML to present the directory list, which would need a way to have a html/js script inserted to track events.

            Life of Advanced Technology

            1 Reply Last reply Reply Quote 0
            • robi
              robi last edited by

              While you could ask for webserver access logs and analyze those, you may be better served by using a Calibre like front end that can present more metadata for the PDFs as well as previews, etc. Think ebook site like zLibrary.

              Life of Advanced Technology

              jdaviescoates 1 Reply Last reply Reply Quote 1
              • jdaviescoates
                jdaviescoates @robi last edited by

                @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:

                https://forum.cloudron.io/post/39264

                I use Cloudron with Gandi & Hetzner

                robi 1 Reply Last reply Reply Quote 1
                • robi
                  robi @jdaviescoates last edited by

                  @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.

                  Life of Advanced Technology

                  1 Reply Last reply Reply Quote 1
                  • humptydumpty
                    humptydumpty last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • timconsidine
                      timconsidine @jdaviescoates last edited by

                      @jdaviescoates are you wanting to track individual files in a directory ? or when someone accesses the directory (listing) ?

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB