Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • SaphuA 124 posts 87 karma points
    Jul 18, 2009 @ 18:56
    SaphuA
    0

    Download counter

    I would like to be able to add a download counter to some files in the Media section. Is this possible? And if so, could someone help me in the right direction?

    Thanks!

  • Tom Madden 253 posts 455 karma points MVP 4x c-trib
    Jul 19, 2009 @ 00:12
    Tom Madden
    2

    You can do this if you're using Google Analytics by adding a bit of javascript code to the link to the document, for example:

    <a href="http://www.example.com/files/map.pdf" onClick="javascript: pageTracker._trackPageview('/downloads/map'); ">

    More info can be found here:

    http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55529

    Of course it won't be 100% accurate (but it will be close) since users can disable JavaScript (but then again that will break Google Analytics altogether)

    If you want something that's 100% accurate the only way would be a solution that used the raw log files from the web server.

    Regards

    Tom

  • Daniel.S 50 posts 135 karma points
    Jul 19, 2009 @ 01:12
    Daniel.S
    1

    One extreme would be to write a custom ASHX handler that can then be used to retrieve media nodes given their ID. You could then do your logging inside that handler.

  • Warren Buckley 2106 posts 4836 karma points MVP 7x admin c-trib
    Jul 20, 2009 @ 09:08
    Warren Buckley
    1

    These solutions sound good, but just as friendly reminder this question is not in the correct section of the forum.
    This forum our.umb dev Forum --> Features is used to request features/ideas for the our.umbraco.org website and not the umbraco core product.

    Warren :)

Please Sign in or register to post replies

Write your reply to:

Draft