Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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,258 ✭✭✭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,698 ✭✭✭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