API and Statistics question

quiksquiks Registered Users Posts: 19 Big grins
I have a question regarding SmugMug APIs.
I'm using the API to get Statistics on my galleries usage. I mainly use the "smugmug.albums.getStats" method.
My problem is that the number of hits returned for a specific Album with the API is not the same as the number of hits reported by SmugMug statistics (Control Panel, Statistics).

I also tried different version of the APIs (1.2.0, 1.2.1, 1.2.2), I always get the same value which is sometimes not the same as the value displayed in Statistics.

Any idea ?

Thanks!

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited March 16, 2010
    G'day quiks,

    Can you please give me a sample AlbumID so that I can check into it.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • quiksquiks Registered Users Posts: 19 Big grins
    edited March 17, 2010
    Here: 11450755

    I get 9295 with APIs and 9416 with SmugMug offical Stats (not the beta one)

    Thanks a lot.
    devbobo wrote:
    G'day quiks,

    Can you please give me a sample AlbumID so that I can check into it.

    Cheers,

    David
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited March 17, 2010
    quiks wrote:
    Here: 11450755

    I get 9295 with APIs and 9416 with SmugMug offical Stats (not the beta one)

    Thanks a lot.

    ok, the discrepancy (at least for API 1.2.2) seems to be that the Original hits aren't being included in the API response (and total). I'll dig in tomorrow and try to work out why.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • quiksquiks Registered Users Posts: 19 Big grins
    edited March 17, 2010
    Great! Thanks in advance!
    devbobo wrote:
    ok, the discrepancy (at least for API 1.2.2) seems to be that the Original hits aren't being included in the API response (and total). I'll dig in tomorrow and try to work out why.

    Cheers,

    David
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited March 19, 2010
    This should be fixed now, can you please confirm ?

    Thanks,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • quiksquiks Registered Users Posts: 19 Big grins
    edited March 19, 2010
    Yes, it's now working correctly! Were you able to fix some bug ? Is that specific to this album ?
    Anyway, THANK YOU VERY MUCH for your fast and efficient help clap.gif

    Cheers,
    Greg.
    devbobo wrote:
    This should be fixed now, can you please confirm ?

    Thanks,

    David
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited March 19, 2010
    yeah, it was a bug...originals weren't being included thumb.gif
    David Parry
    SmugMug API Developer
    My Photos
  • quiksquiks Registered Users Posts: 19 Big grins
    edited April 26, 2010
    Sorry to disturbe you again
    devbobo wrote:
    yeah, it was a bug...originals weren't being included thumb.gif
    But it's happening again, in another way:
    When I check the "new" stats on SmugMug for an album (say album #8047354), for the month of "April" (1st april to today), I get 8+10+2 = 20 hits. This seems to be correct.
    BUT, when I use the APIs (1.2.0, 1.2.1 or even 1.2.2), I always get 0. I get 0 in 1.2.2 for "Hits" but also if I do the math with every picture in the album. It's just 0!....

    It's working wrong with all my albums for this month.
    I've seen that it seems to be correct for the previous months (I tried march on the same album).

    Don't know if the problem is "current month" only....
    Help greatly appreciated.

    Cheers,
    Greg.
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 28, 2010
    G'day Greg,

    yeah, sorry about that...i'm working with the sorcerer who has been working on stats to resolve the problems.

    Cheers,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • quiksquiks Registered Users Posts: 19 Big grins
    edited May 11, 2010
    devbobo wrote: »
    G'day Greg,

    yeah, sorry about that...i'm working with the sorcerer who has been working on stats to resolve the problems.

    Cheers,

    David

    Any news regarding my problem, David ?

    Cheers,
    Greg.
  • SamirDSamirD Registered Users Posts: 3,474 Major grins
    edited November 3, 2010
    quiks wrote: »
    I'm using the API to get Statistics on my galleries usage. I mainly use the "smugmug.albums.getStats" method.
    I know this isn't exactly related to this thread, but would you mind sharing your code? I'm wanting to do something similar. Thank you in advance! thumb.gif
    Pictures and Videos of the Huntsville Car Scene: www.huntsvillecarscene.com
    Want faster uploading? Vote for FTP!
Sign In or Register to comment.