Analytics and pictures

Discussion in 'Google' started by aurrida, Apr 20, 2008.

  1. #1
    i am getting data from links using analytics but not the pictures. the pictures are recognized, what can i do?
     
    aurrida, Apr 20, 2008 IP
  2. The Stealthy One

    The Stealthy One Well-Known Member Affiliate Manager

    Messages:
    3,043
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    105
    #2
    I am not sure what you are asking?
     
    The Stealthy One, Apr 20, 2008 IP
  3. aurrida

    aurrida Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    sorry, just not up on the language. i use google analytics. it give me data when visitors click on a link in my site. i can see this using site overlay.

    i can also see that the same statistic boxes are monitoring when people click on my pics but there is no data, they always remain at 0%. any ideas why.

    thanks for the reply.
     
    aurrida, Apr 20, 2008 IP
  4. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #4
    Analytics can monitor how many clicks images get, but that's it.

    Reason being image formats can not contain the Javascript code Analytics needs to collect data.
    The page where people find images can include the Analytics code, and thus is able to track when someone clicks a link pointing to an image.
     
    joebert, Apr 20, 2008 IP
  5. aurrida

    aurrida Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    but its not giving data as to how many people are clicking on a picture if they decide to enlarge it, no page links.

    you may have said that, unless the pic is a link it cant monitor it?
     
    aurrida, Apr 20, 2008 IP
  6. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #6
    How are images being displayed when they're enlarged ?

    Is there a link pointing to a new image like so
    <a href="image-large.jpg"><img src="image-thumb.jpg"/></a>
    Code (markup):
    If that's the case, you'll add the Analytics trackPageView to the link similar to this
    <a href="image-large.jpg" onmousedown="pageTracker._trackPageview(this.href)"><img src="image-thumb.jpg"/></a>
    Code (markup):
    If you've got an existing javascript method attached to images similar to this
    <img src="thumb.jpg" onclick="window.open('full.php?img='+this.src)"/>
    Code (markup):
    Then it will be more along these lines
    <img src="thumb.jpg" onclick="pageTracker._trackPageview(this.src);" window.open('full.php?img='+this.src)"/>
    Code (markup):
    It depends on what you've got in place already.
    For all I know you could have a script that's selecting all elements of a certain CSS class and applying an onclick event handler to them, If that was the case you would just modify the function attached as the event handler.
     
    joebert, Apr 20, 2008 IP
  7. aurrida

    aurrida Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thanks, its the top one. tried your code but error. i understand thats not your fault.

    used googles tracking code. i will need to have a look which one.

    thanks for your help. newby hope you understand :rolleyes:
     
    aurrida, Apr 20, 2008 IP
  8. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #8
    I understand completely. :D
     
    joebert, Apr 20, 2008 IP