Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

image view counter?

  • 02-08-2011 11:18am
    #1
    Registered Users, Registered Users 2 Posts: 666 ✭✭✭


    Hi all.

    I was wondering if someone help me out

    I have some images placed in an image folder on our company site, we want to display these images on one of our partners we sites.
    & we want to be able to count how many times the image has been viewed?

    How can this be done?

    Thanks for taking the time to read this
    All info or links will be greatly appreciated

    Cheers
    S


Comments

  • Registered Users, Registered Users 2 Posts: 1,256 ✭✭✭blue4ever


    I think that's difficult. You can used Analytic events - but you need code on the page that hosts the image. If you are primarydomain.com and you have a image on second website secondarydomain.com then you'd need your event analytics code on that page, which may not always be possible.

    The only way I can think you might achieve it would be that the partner site 'links' to your photo (ie the address on their site is <IMG SRC ="http://primarydomain.com/borrowed.gif&quot; alt="Picture"> hosted on your site. Then. so long as that pic is not used (under that name anyway) on your main site, then any time the image is called on the second site it will register in your server logs.

    You will have to do a bit of digging using your server logs to get any real 'information'


  • Closed Accounts Posts: 9,700 ✭✭✭tricky D


    This should be easily doable if you have access to the raw logfiles. Either you import the logfiles into a spreadsheet, sort by the image, then sort by the requesting page/domain and count.
    78.14.147.113 - - [31/Jul/2011:00:46:24 +0100] "GET /zzz/ghp_jpg.jpg HTTP/1.1" 200 2529 "http://www.zzz.com/zzz/index.html&quot; "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30"

    Another simpler way is to tag the image filename with a ? field and count that from the logfiles eg. image/jpg?partner-site. The image will display as normal but the 'partner-site' will appear in the logs.

    78.14.147.113 - - [31/Jul/2011:00:46:24 +0100] "GET /zzz/ghp_jpg.jpg?partner-site HTTP/1.1" 200 2529 "http://www.zzz.com/zzz/index.html&quot; "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30"


Advertisement